]> granicus.if.org Git - clang/commit
[analyzer] Add scope information to CFG
authorMaxim Ostapenko <chefmax7@gmail.com>
Mon, 12 Mar 2018 12:26:15 +0000 (12:26 +0000)
committerMaxim Ostapenko <chefmax7@gmail.com>
Mon, 12 Mar 2018 12:26:15 +0000 (12:26 +0000)
commit359fc2a1d2d12c507b82224b42eb22ebf79f98f8
tree4b8791943286b09790136d04557121091d4a25a4
parentab55018afcf7651d15b7e0aa4b4cf0f9e25904d2
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327258 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/Analysis/AnalysisDeclContext.h
include/clang/Analysis/CFG.h
include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
lib/Analysis/AnalysisDeclContext.cpp
lib/Analysis/CFG.cpp
lib/StaticAnalyzer/Core/AnalysisManager.cpp
lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
lib/StaticAnalyzer/Core/ExprEngine.cpp
lib/StaticAnalyzer/Core/PathDiagnostic.cpp
test/Analysis/analyzer-config.c
test/Analysis/analyzer-config.cpp
test/Analysis/scopes-cfg-output.cpp [new file with mode: 0644]