[cfe-commits] r91196 - /cfe/trunk/lib/Frontend/AnalysisConsumer.cpp

Ted Kremenek kremenek at apple.com
Fri Dec 11 17:04:15 PST 2009


Author: kremenek
Date: Fri Dec 11 19:04:14 2009
New Revision: 91196

URL: http://llvm.org/viewvc/llvm-project?rev=91196&view=rev
Log:
We should only scan for nested blocks if we are analyzing the body of a function/method.

Modified:
    cfe/trunk/lib/Frontend/AnalysisConsumer.cpp

Modified: cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/AnalysisConsumer.cpp?rev=91196&r1=91195&r2=91196&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/Frontend/AnalysisConsumer.cpp Fri Dec 11 19:04:14 2009
@@ -302,7 +302,7 @@
   llvm::SmallVector<Decl*, 10> WL;
   WL.push_back(D);
   
-  if (Opts.AnalyzeNestedBlocks)
+  if (Body && Opts.AnalyzeNestedBlocks)
     FindBlocks(cast<DeclContext>(D), WL);
   
   for (Actions::iterator I = actions.begin(), E = actions.end(); I != E; ++I)





More information about the cfe-commits mailing list