Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warnings about type qualifiers from code #65

Merged
merged 1 commit into from
Jun 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ There are multiple unsupported cases that should be considered when generating b
In order to use defines one should write wrapper functions that return defined values.
3. There is no way to reuse already generated bindings.
Bindgen outputs bindings also for headers that were included in a given header.
4. Type qualifiers `const`, `volatile` and `restrict` are not supported.

## License

Expand Down
15 changes: 0 additions & 15 deletions bindgen/TypeTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,6 @@ TypeTranslator::TranslateConstantArray(const clang::ConstantArrayType *ar,
std::string TypeTranslator::Translate(const clang::QualType &qtpe,
const std::string *avoid) {

// Warning / Sanity checks

if (qtpe.isConstQualified() || (ctx && qtpe.isConstant(*ctx))) {
llvm::errs() << "Warning: Const qualifier not supported\n";
llvm::errs().flush();
}
if (qtpe.isVolatileQualified()) {
llvm::errs() << "Warning: Volatile qualifier not supported\n";
llvm::errs().flush();
}
if (qtpe.isRestrictQualified()) {
llvm::errs() << "Warning: Restrict qualifier not supported\n";
llvm::errs().flush();
}

const clang::Type *tpe = qtpe.getTypePtr();

if (typeEquals(tpe, avoid)) {
Expand Down