From: Ted Kremenek Date: Tue, 19 Feb 2008 02:33:31 +0000 (+0000) Subject: For now, --grsimple skips analyzing functions in header files. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b9c31f008f2bd76063bfa072d69197af74d66926;p=clang For now, --grsimple skips analyzing functions in header files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47303 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp index 305503fe07..9dcc28a3e0 100644 --- a/Driver/ASTConsumers.cpp +++ b/Driver/ASTConsumers.cpp @@ -604,6 +604,10 @@ void GRSimpleValsVisitor::VisitCFG(CFG& C, FunctionDecl& FD) { if (FName.size() > 0 && FName != FD.getIdentifier()->getName()) return; + if (FD.getLocation().getFileID() != Ctx->getSourceManager().getMainFileID()) + return; + + if (!Visualize) { llvm::cerr << "ANALYZE: " << FD.getIdentifier()->getName() << ' ' << Ctx->getSourceManager().getSourceName(FD.getLocation())