]> granicus.if.org Git - clang/commitdiff
[analyzer] PostImplicitCall can also occur between CFGElements.
authorJordan Rose <jordan_rose@apple.com>
Thu, 26 Jul 2012 20:03:56 +0000 (20:03 +0000)
committerJordan Rose <jordan_rose@apple.com>
Thu, 26 Jul 2012 20:03:56 +0000 (20:03 +0000)
This avoids an assertion crash when we invalidate on a destructor call
instead of inlining it.

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

lib/StaticAnalyzer/Core/CoreEngine.cpp

index c3be8c8c0a2bbb2d996134ffc73f9192226f41ce..1f137424d450e67d9f6862935e018a7bda6775f1 100644 (file)
@@ -266,6 +266,7 @@ void CoreEngine::dispatchWorkItem(ExplodedNode* Pred, ProgramPoint Loc,
     default:
       assert(isa<PostStmt>(Loc) ||
              isa<PostInitializer>(Loc) ||
+             isa<PostImplicitCall>(Loc) ||
              isa<CallExitEnd>(Loc));
       HandlePostStmt(WU.getBlock(), WU.getIndex(), Pred);
       break;
@@ -507,7 +508,8 @@ void CoreEngine::enqueueStmtNode(ExplodedNode *N,
   }
 
   // Do not create extra nodes. Move to the next CFG element.
-  if (isa<PostInitializer>(N->getLocation())) {
+  if (isa<PostInitializer>(N->getLocation()) ||
+      isa<PostImplicitCall>(N->getLocation())) {
     WList->enqueue(N, Block, Idx+1);
     return;
   }