diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-23 23:48:01 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-23 23:48:01 +0200 |
commit | 6052a839f5f236d0885f33d4a751052e1b7ee23f (patch) | |
tree | 4e1004bf93d5d60fea6baae63f8097fd58bc8964 /compilerplugins | |
parent | 028769528d1835c9069eb7e717a1aa2186c51351 (diff) |
Mac OS X ctype.h isdigit is not extern "C"
Change-Id: Ied43178bacc020b848ee3196080713e08c780133
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/implicitboolconversion.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compilerplugins/clang/implicitboolconversion.cxx b/compilerplugins/clang/implicitboolconversion.cxx index 41ece58d1f7a..dec8e233ebb8 100644 --- a/compilerplugins/clang/implicitboolconversion.cxx +++ b/compilerplugins/clang/implicitboolconversion.cxx @@ -828,7 +828,11 @@ bool ImplicitBoolConversion::isExternCFunctionCall( Decl const * d = expr->getCalleeDecl(); if (d != nullptr) { FunctionDecl const * fd = dyn_cast<FunctionDecl>(d); - if (fd != nullptr && fd->isExternC()) { + if (fd != nullptr + && (fd->isExternC() + || compiler.getSourceManager().isInExternCSystemHeader( + fd->getLocation()))) + { PointerType const * pt = fd->getType()->getAs<PointerType>(); QualType t2(pt == nullptr ? fd->getType() : pt->getPointeeType()); *functionType = t2->getAs<FunctionProtoType>(); |