diff options
author | Peter Szecsi <szepet95@gmail.com> | 2017-08-21 16:10:19 +0000 |
---|---|---|
committer | Peter Szecsi <szepet95@gmail.com> | 2017-08-21 16:10:19 +0000 |
commit | 4aa5e10fcc0b1546ce33c1b60f9cfd6db3e42f81 (patch) | |
tree | e680396c00ad58a0ec26935c93303b0eb0b3572e /clang/lib/StaticAnalyzer/Core/CoreEngine.cpp | |
parent | cc255bcd7720c77a931e239f13f72bae37a90e8d (diff) | |
download | bcm5719-llvm-4aa5e10fcc0b1546ce33c1b60f9cfd6db3e42f81.tar.gz bcm5719-llvm-4aa5e10fcc0b1546ce33c1b60f9cfd6db3e42f81.zip |
[StaticAnalyzer] Handle LoopExit CFGElement in the analyzer
This patch adds handling of the LoopExit CFGElements to the StaticAnalyzer.
This is reached by introducing a new ProgramPoint.
Tests will be added in a following commit.
Differential Revision: https://reviews.llvm.org/D35670
llvm-svn: 311344
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/CoreEngine.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/CoreEngine.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp index 4e2866c56f0..e2e9ddf5048 100644 --- a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp @@ -274,7 +274,8 @@ void CoreEngine::dispatchWorkItem(ExplodedNode* Pred, ProgramPoint Loc, assert(Loc.getAs<PostStmt>() || Loc.getAs<PostInitializer>() || Loc.getAs<PostImplicitCall>() || - Loc.getAs<CallExitEnd>()); + Loc.getAs<CallExitEnd>() || + Loc.getAs<LoopExit>()); HandlePostStmt(WU.getBlock(), WU.getIndex(), Pred); break; } @@ -566,7 +567,8 @@ void CoreEngine::enqueueStmtNode(ExplodedNode *N, // Do not create extra nodes. Move to the next CFG element. if (N->getLocation().getAs<PostInitializer>() || - N->getLocation().getAs<PostImplicitCall>()) { + N->getLocation().getAs<PostImplicitCall>()|| + N->getLocation().getAs<LoopExit>()) { WList->enqueue(N, Block, Idx+1); return; } |