diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-31 09:37:27 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-31 09:44:46 +0100 |
commit | b21e3d16aa21992d6370c4b57a83039c433ef070 (patch) | |
tree | a7053721587dae86df2b355e120267259a7e15af /compilerplugins/clang/implicitboolconversion.cxx | |
parent | 29b322ea0c40423a39efe2f6c2c85a7d2108c512 (diff) |
Clang API function terminology got changed
...at least in trunk 200400 towards Clang 3.5.
Change-Id: I6e295e3a4cf721fbda9df8e7c5bed3993ee78216
Diffstat (limited to 'compilerplugins/clang/implicitboolconversion.cxx')
-rw-r--r-- | compilerplugins/clang/implicitboolconversion.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/compilerplugins/clang/implicitboolconversion.cxx b/compilerplugins/clang/implicitboolconversion.cxx index ae26e01bb501..5a44ad6b7bfa 100644 --- a/compilerplugins/clang/implicitboolconversion.cxx +++ b/compilerplugins/clang/implicitboolconversion.cxx @@ -15,6 +15,7 @@ #include <string> #include <vector> +#include "compat.hxx" #include "plugin.hxx" template<> struct std::iterator_traits<ExprIterator> { @@ -183,11 +184,11 @@ bool ImplicitBoolConversion::TraverseCallExpr(CallExpr * expr) { } else { std::ptrdiff_t n = j - expr->arg_begin(); assert(n >= 0); - assert(n < t->getNumArgs() || t->isVariadic()); - if (n < t->getNumArgs() - && !(t->getArgType(n)->isSpecificBuiltinType( + assert(n < compat::getNumParams(*t) || t->isVariadic()); + if (n < compat::getNumParams(*t) + && !(compat::getParamType(*t, n)->isSpecificBuiltinType( BuiltinType::Int) - || (t->getArgType(n)->isSpecificBuiltinType( + || (compat::getParamType(*t, n)->isSpecificBuiltinType( BuiltinType::UInt)))) { reportWarning(i); @@ -494,8 +495,10 @@ bool ImplicitBoolConversion::TraverseReturnStmt(ReturnStmt * stmt) { bool ImplicitBoolConversion::TraverseFunctionDecl(FunctionDecl * decl) { bool ext = hasCLanguageLinkageType(decl) && decl->isThisDeclarationADefinition() - && (decl->getResultType()->isSpecificBuiltinType(BuiltinType::Int) - || decl->getResultType()->isSpecificBuiltinType(BuiltinType::UInt)); + && (compat::getReturnType(*decl)->isSpecificBuiltinType( + BuiltinType::Int) + || compat::getReturnType(*decl)->isSpecificBuiltinType( + BuiltinType::UInt)); if (ext) { assert(!externCIntFunctionDefinition); externCIntFunctionDefinition = true; |