From 999a25ff7283bd83f105ffb826b85181a30ffa41 Mon Sep 17 00:00:00 2001 From: Peter Szecsi Date: Sat, 19 Aug 2017 11:19:16 +0000 Subject: [CFG] Add LoopExit information to CFG This patch introduces a new CFG element CFGLoopExit that indicate when a loop ends. It does not deal with returnStmts yet (left it as a TODO). It hidden behind a new analyzer-config flag called cfg-loopexit (false by default). Test cases added. The main purpose of this patch right know is to make loop unrolling and loop widening easier and more efficient. However, this information can be useful for future improvements in the StaticAnalyzer core too. Differential Revision: https://reviews.llvm.org/D35668 llvm-svn: 311235 --- clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 835b3536865..547978ad43c 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -365,6 +365,7 @@ void ExprEngine::processCFGElement(const CFGElement E, ExplodedNode *Pred, ProcessImplicitDtor(E.castAs(), Pred); return; case CFGElement::LifetimeEnds: + case CFGElement::LoopExit: return; } } -- cgit v1.2.3