Mac OS X ctype.h isdigit is not extern "C"

Change-Id: Ied43178bacc020b848ee3196080713e08c780133
This commit is contained in:
Stephan Bergmann
2015-04-23 23:48:01 +02:00
parent 028769528d
commit 6052a839f5

View File

@@ -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>();