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

Anna Zaks ganna at apple.com
Mon Aug 13 17:36:13 PDT 2012


Author: zaks
Date: Mon Aug 13 19:36:12 2012
New Revision: 161819

URL: http://llvm.org/viewvc/llvm-project?rev=161819&view=rev
Log:
[analyzer] Add getStackFrame() to CheckerContext and ExplodedNode.

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
    cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.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=161819&r1=161818&r2=161819&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h Mon Aug 13 19:36:12 2012
@@ -92,8 +92,8 @@
     return Pred->getLocationContext();
   }
 
-  const StackFrameContext *getCurrentStackFrame() const {
-    return getLocationContext()->getCurrentStackFrame();
+  const StackFrameContext *getStackFrame() const {
+    return Pred->getStackFrame();
   }
 
   BugReporter &getBugReporter() {

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h?rev=161819&r1=161818&r2=161819&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h Mon Aug 13 19:36:12 2012
@@ -133,6 +133,10 @@
     return getLocation().getLocationContext();
   }
 
+  const StackFrameContext *getStackFrame() const {
+    return getLocationContext()->getCurrentStackFrame();
+  }
+
   const Decl &getCodeDecl() const { return *getLocationContext()->getDecl(); }
 
   CFG &getCFG() const { return *getLocationContext()->getCFG(); }

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp?rev=161819&r1=161818&r2=161819&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp Mon Aug 13 19:36:12 2012
@@ -125,7 +125,7 @@
 
   RecE= RecE->IgnoreParenImpCasts();
   if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(RecE)) {
-    const StackFrameContext *SFCtx = C.getCurrentStackFrame();
+    const StackFrameContext *SFCtx = C.getStackFrame();
     // Are we calling [self alloc]? If this is self, get the type of the
     // enclosing ObjC class.
     if (DRE->getDecl() == SFCtx->getSelfDecl()) {





More information about the cfe-commits mailing list