Index: cfe/trunk/lib/StaticAnalyzer/Core/CheckerContext.cpp =================================================================== --- cfe/trunk/lib/StaticAnalyzer/Core/CheckerContext.cpp +++ cfe/trunk/lib/StaticAnalyzer/Core/CheckerContext.cpp @@ -57,12 +57,8 @@ return false; // Look through 'extern "C"' and anything similar invented in the future. - const DeclContext *DC = FD->getDeclContext(); - while (DC->isTransparentContext()) - DC = DC->getParent(); - - // If this function is in a namespace, it is not a C library function. - if (!DC->isTranslationUnit()) + // If this function is not in TU directly, it is not a C library function. + if (!FD->getDeclContext()->getRedeclContext()->isTranslationUnit()) return false; // If this function is not externally visible, it is not a C library function.