diff options
author | Matthias Gehre <M.Gehre@gmx.de> | 2017-07-12 07:04:19 +0000 |
---|---|---|
committer | Matthias Gehre <M.Gehre@gmx.de> | 2017-07-12 07:04:19 +0000 |
commit | 351c218d15720158b1de0fc3b1d552e5e5f3302a (patch) | |
tree | 8998245d3df51828137c0c702671240a4ff2e580 /clang/test/Analysis/analyzer-config.c | |
parent | 3a5d082a05845bd396b74c1b90064627a39d6989 (diff) | |
download | bcm5719-llvm-351c218d15720158b1de0fc3b1d552e5e5f3302a.tar.gz bcm5719-llvm-351c218d15720158b1de0fc3b1d552e5e5f3302a.zip |
CFG: Add CFGElement for automatic variables that leave the scope
Summary:
This mimics the implementation for the implicit destructors. The
generation of this scope leaving elements is hidden behind
a flag to the CFGBuilder, thus it should not affect existing code.
Currently, I'm missing a test (it's implicitly tested by the clang-tidy
lifetime checker that I'm proposing).
I though about a test using debug.DumpCFG, but then I would
have to add an option to StaticAnalyzer/Core/AnalyzerOptions
to enable the scope leaving CFGElement,
which would only be useful to that particular test.
Any other ideas how I could make a test for this feature?
Reviewers: krememek, jordan_rose
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D15031
llvm-svn: 307759
Diffstat (limited to 'clang/test/Analysis/analyzer-config.c')
-rw-r--r-- | clang/test/Analysis/analyzer-config.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/Analysis/analyzer-config.c b/clang/test/Analysis/analyzer-config.c index 70521c63fba..0d8d34fbf6b 100644 --- a/clang/test/Analysis/analyzer-config.c +++ b/clang/test/Analysis/analyzer-config.c @@ -12,6 +12,8 @@ void foo() { // CHECK: [config] // CHECK-NEXT: cfg-conditional-static-initializers = true +// CHECK-NEXT: cfg-implicit-dtors = true +// CHECK-NEXT: cfg-lifetime = false // CHECK-NEXT: cfg-temporary-dtors = false // CHECK-NEXT: faux-bodies = true // CHECK-NEXT: graph-trim-interval = 1000 @@ -27,5 +29,4 @@ void foo() { // CHECK-NEXT: region-store-small-struct-limit = 2 // CHECK-NEXT: widen-loops = false // CHECK-NEXT: [stats] -// CHECK-NEXT: num-entries = 15 - +// CHECK-NEXT: num-entries = 17 |