From 598a94b5692e90b0a3bf05abc5c5e8db43eb4e9b Mon Sep 17 00:00:00 2001 From: kornilova-l Date: Sat, 23 Jun 2018 17:50:18 +0400 Subject: [PATCH] Remove warnings about type qualifiers from code --- README.md | 1 + bindgen/TypeTranslator.cpp | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/README.md b/README.md index 5cebd89..41c548f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/bindgen/TypeTranslator.cpp b/bindgen/TypeTranslator.cpp index 4f97a8c..e8b301c 100644 --- a/bindgen/TypeTranslator.cpp +++ b/bindgen/TypeTranslator.cpp @@ -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)) {