[cfe-commits] r162932 - in /cfe/trunk: include/clang/StaticAnalyzer/AnalyzerOptions.h lib/Frontend/CompilerInvocation.cpp lib/StaticAnalyzer/Core/ExprEngine.cpp

Ted Kremenek kremenek at apple.com
Thu Aug 30 12:26:57 PDT 2012


Author: kremenek
Date: Thu Aug 30 14:26:56 2012
New Revision: 162932

URL: http://llvm.org/viewvc/llvm-project?rev=162932&view=rev
Log:
Rename 'MaxLoop' to 'maxBlockVisitOnPath' to reflect reality.  We
should consider renaming the command line option as well.

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/AnalyzerOptions.h
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp

Modified: cfe/trunk/include/clang/StaticAnalyzer/AnalyzerOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/AnalyzerOptions.h?rev=162932&r1=162931&r2=162932&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/AnalyzerOptions.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/AnalyzerOptions.h Thu Aug 30 14:26:56 2012
@@ -98,7 +98,7 @@
   unsigned MaxNodes;
   
   /// \brief The maximum number of times the analyzer visits a block.
-  unsigned MaxLoop;
+  unsigned maxBlockVisitOnPath;
   
   
   unsigned ShowCheckerHelp : 1;

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=162932&r1=162931&r2=162932&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Thu Aug 30 14:26:56 2012
@@ -1131,7 +1131,7 @@
   Opts.CFGAddImplicitDtors = Args.hasArg(OPT_analysis_CFGAddImplicitDtors);
   Opts.TrimGraph = Args.hasArg(OPT_trim_egraph);
   Opts.MaxNodes = Args.getLastArgIntValue(OPT_analyzer_max_nodes, 150000,Diags);
-  Opts.MaxLoop = Args.getLastArgIntValue(OPT_analyzer_max_loop, 4, Diags);
+  Opts.maxBlockVisitOnPath = Args.getLastArgIntValue(OPT_analyzer_max_loop, 4, Diags);
   Opts.eagerlyTrimExplodedGraph = !Args.hasArg(OPT_analyzer_no_eagerly_trim_egraph);
   Opts.PrintStats = Args.hasArg(OPT_analyzer_stats);
   Opts.InlineMaxStackDepth =

Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp?rev=162932&r1=162931&r2=162932&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp Thu Aug 30 14:26:56 2012
@@ -1024,7 +1024,7 @@
   // FIXME: Refactor this into a checker.
   ExplodedNode *pred = nodeBuilder.getContext().getPred();
   
-  if (nodeBuilder.getContext().blockCount() >= AMgr.options.MaxLoop) {
+  if (nodeBuilder.getContext().blockCount() >= AMgr.options.maxBlockVisitOnPath) {
     static SimpleProgramPointTag tag("ExprEngine : Block count exceeded");
     const ExplodedNode *Sink =
                    nodeBuilder.generateSink(pred->getState(), pred, &tag);





More information about the cfe-commits mailing list