]> granicus.if.org Git - clang/commitdiff
For now, --grsimple skips analyzing functions in header files.
authorTed Kremenek <kremenek@apple.com>
Tue, 19 Feb 2008 02:33:31 +0000 (02:33 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 19 Feb 2008 02:33:31 +0000 (02:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47303 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/ASTConsumers.cpp

index 305503fe07c8b8e5519f08f9e793177975eb6c57..9dcc28a3e0940a8adfd5f0b0a55c688bb8d5d739 100644 (file)
@@ -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())