[cfe-commits] r162950 - in /cfe/trunk: docs/analyzer/IPA.txt include/clang/StaticAnalyzer/AnalyzerOptions.h lib/Frontend/CompilerInvocation.cpp test/Analysis/retain-release.m

Anna Zaks ganna at apple.com
Thu Aug 30 15:42:59 PDT 2012


Author: zaks
Date: Thu Aug 30 17:42:59 2012
New Revision: 162950

URL: http://llvm.org/viewvc/llvm-project?rev=162950&view=rev
Log:
[analyzer] Make analyzer-ipa=dynamic-bifurcate the default.

There are two tests regressions that come from the fact that the Retain
Count checker does not cancel out inlining of ObjC methods.

Modified:
    cfe/trunk/docs/analyzer/IPA.txt
    cfe/trunk/include/clang/StaticAnalyzer/AnalyzerOptions.h
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp
    cfe/trunk/test/Analysis/retain-release.m

Modified: cfe/trunk/docs/analyzer/IPA.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/analyzer/IPA.txt?rev=162950&r1=162949&r2=162950&view=diff
==============================================================================
--- cfe/trunk/docs/analyzer/IPA.txt (original)
+++ cfe/trunk/docs/analyzer/IPA.txt Thu Aug 30 17:42:59 2012
@@ -23,7 +23,7 @@
    does not drop the coverage in cases when the parent class has code that is
    only exercised when some of its methods are overridden.
 
-Currently, -analyzer-ipa=basic-inlining is the default mode.
+Currently, -analyzer-ipa=dynamic-bifurcate is the default mode.
 
 Basics of Implementation
 -----------------------

Modified: cfe/trunk/include/clang/StaticAnalyzer/AnalyzerOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/AnalyzerOptions.h?rev=162950&r1=162949&r2=162950&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/AnalyzerOptions.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/AnalyzerOptions.h Thu Aug 30 17:42:59 2012
@@ -144,7 +144,7 @@
     AnalysisConstraintsOpt = RangeConstraintsModel;
     AnalysisDiagOpt = PD_HTML;
     AnalysisPurgeOpt = PurgeStmt;
-    IPAMode = BasicInlining;
+    IPAMode = DynamicDispatchBifurcate;
     ShowCheckerHelp = 0;
     AnalyzeAll = 0;
     AnalyzerDisplayProgress = 0;

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=162950&r1=162949&r2=162950&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Thu Aug 30 17:42:59 2012
@@ -147,7 +147,7 @@
                   getAnalysisPurgeModeName(Opts.AnalysisPurgeOpt));
   if (!Opts.AnalyzeSpecificFunction.empty())
     Res.push_back("-analyze-function", Opts.AnalyzeSpecificFunction);
-  if (Opts.IPAMode != BasicInlining)
+  if (Opts.IPAMode != DynamicDispatchBifurcate)
     Res.push_back("-analyzer-ipa", getAnalysisIPAModeName(Opts.IPAMode));
   if (Opts.InliningMode != NoRedundancy)
     Res.push_back("-analyzer-inlining-mode",

Modified: cfe/trunk/test/Analysis/retain-release.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/retain-release.m?rev=162950&r1=162949&r2=162950&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/retain-release.m (original)
+++ cfe/trunk/test/Analysis/retain-release.m Thu Aug 30 17:42:59 2012
@@ -828,8 +828,8 @@
 @end
 
 void test_RDar6859457(RDar6859457 *x, void *bytes, NSUInteger dataLength) {
-  [x NoCopyString]; // no-warning
-  [x noCopyString]; // no-warning
+  [x NoCopyString]; // expected-warning{{leak}}
+  [x noCopyString]; // expected-warning{{leak}}
   [NSData dataWithBytesNoCopy:bytes length:dataLength];  // no-warning
   [NSData dataWithBytesNoCopy:bytes length:dataLength freeWhenDone:1]; // no-warning
 }





More information about the cfe-commits mailing list