]> granicus.if.org Git - clang/commitdiff
[analyzer] Remove isWithinInlined. It's been replaced with inTopFrame().
authorAnna Zaks <ganna@apple.com>
Tue, 6 Nov 2012 04:20:54 +0000 (04:20 +0000)
committerAnna Zaks <ganna@apple.com>
Tue, 6 Nov 2012 04:20:54 +0000 (04:20 +0000)
Thanks Jordan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167438 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp

index b0f1c5897d908700c926c4e2389b6c6d438695fe..da7e6de735748fc7bd19cbb8b5ed370252d26fc2 100644 (file)
@@ -130,11 +130,6 @@ public:
   /// 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();
   }
index e170aa56c5cbb401a26019071b2a7bbfb677ec3e..0dd64780f12141df3fa6174e805c6f342b0a1c89 100644 (file)
@@ -763,7 +763,7 @@ void ObjCNonNilReturnValueChecker::checkPostObjCMessage(const ObjCMethodCall &M,
     // 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);