[cfe-commits] r167438 - in /cfe/trunk: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp

Anna Zaks ganna at apple.com
Mon Nov 5 20:20:54 PST 2012


Author: zaks
Date: Mon Nov  5 22:20:54 2012
New Revision: 167438

URL: http://llvm.org/viewvc/llvm-project?rev=167438&view=rev
Log:
[analyzer] Remove isWithinInlined. It's been replaced with inTopFrame().

Thanks Jordan.

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
    cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h?rev=167438&r1=167437&r2=167438&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h Mon Nov  5 22:20:54 2012
@@ -130,11 +130,6 @@
   /// Return true if the current LocationContext has no caller context.
   bool inTopFrame() const { return getLocationContext()->inTopFrame();  }
 
-  /// Returns true if the predecessor is within an inlined function/method.
-  bool isWithinInlined() {
-    return (getStackFrame()->getParent() != 0);
-  }
-
   BugReporter &getBugReporter() {
     return Eng.getBugReporter();
   }

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp?rev=167438&r1=167437&r2=167438&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp Mon Nov  5 22:20:54 2012
@@ -763,7 +763,7 @@
     // since 'nil' is rarely returned in practice, we should not warn when the
     // caller to the defensive constructor uses the object in contexts where
     // 'nil' is not accepted.
-    if (C.isWithinInlined() && M.getDecl() &&
+    if (!C.inTopFrame() && M.getDecl() &&
         M.getDecl()->getMethodFamily() == OMF_init &&
         M.isReceiverSelfOrSuper()) {
       State = assumeExprIsNonNull(M.getOriginExpr(), State, C);





More information about the cfe-commits mailing list