Skip to content

Commit 9c5b2f0

Browse files
authored
Merge pull request #65 from kornilova-l/do-not-warn-about-type-qualifiers
Remove warnings about type qualifiers from code
2 parents b89a3fa + 598a94b commit 9c5b2f0

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ There are multiple unsupported cases that should be considered when generating b
9696
In order to use defines one should write wrapper functions that return defined values.
9797
3. There is no way to reuse already generated bindings.
9898
Bindgen outputs bindings also for headers that were included in a given header.
99+
4. Type qualifiers `const`, `volatile` and `restrict` are not supported.
99100

100101
## License
101102

bindgen/TypeTranslator.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,21 +134,6 @@ TypeTranslator::TranslateConstantArray(const clang::ConstantArrayType *ar,
134134
std::string TypeTranslator::Translate(const clang::QualType &qtpe,
135135
const std::string *avoid) {
136136

137-
// Warning / Sanity checks
138-
139-
if (qtpe.isConstQualified() || (ctx && qtpe.isConstant(*ctx))) {
140-
llvm::errs() << "Warning: Const qualifier not supported\n";
141-
llvm::errs().flush();
142-
}
143-
if (qtpe.isVolatileQualified()) {
144-
llvm::errs() << "Warning: Volatile qualifier not supported\n";
145-
llvm::errs().flush();
146-
}
147-
if (qtpe.isRestrictQualified()) {
148-
llvm::errs() << "Warning: Restrict qualifier not supported\n";
149-
llvm::errs().flush();
150-
}
151-
152137
const clang::Type *tpe = qtpe.getTypePtr();
153138

154139
if (typeEquals(tpe, avoid)) {

0 commit comments

Comments
 (0)