diff options
author | Maxim Ostapenko <chefmax7@gmail.com> | 2018-03-12 12:26:15 +0000 |
---|---|---|
committer | Maxim Ostapenko <chefmax7@gmail.com> | 2018-03-12 12:26:15 +0000 |
commit | debca45e45a13a5ffef8893f8a7cd6dbbc113a4e (patch) | |
tree | 2ce1fc015608e04fe31970103556b96e7d693610 /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | 11a6db30279a0021e4222b4c48c35a7ec2e8b142 (diff) | |
download | bcm5719-llvm-debca45e45a13a5ffef8893f8a7cd6dbbc113a4e.tar.gz bcm5719-llvm-debca45e45a13a5ffef8893f8a7cd6dbbc113a4e.zip |
[analyzer] Add scope information to CFG
This patch adds two new CFG elements CFGScopeBegin and CFGScopeEnd that indicate
when a local scope begins and ends respectively. We use first VarDecl declared
in a scope to uniquely identify it and add CFGScopeBegin and CFGScopeEnd elements
into corresponding basic blocks.
Differential Revision: https://reviews.llvm.org/D16403
llvm-svn: 327258
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index fba2624d828..bacc99047cf 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -632,6 +632,8 @@ void ExprEngine::processCFGElement(const CFGElement E, ExplodedNode *Pred, ProcessLoopExit(E.castAs<CFGLoopExit>().getLoopStmt(), Pred); return; case CFGElement::LifetimeEnds: + case CFGElement::ScopeBegin: + case CFGElement::ScopeEnd: return; } } |