diff options
Diffstat (limited to 'test/Analysis/no-unreachable-dtors.cpp')
| -rw-r--r-- | test/Analysis/no-unreachable-dtors.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Analysis/no-unreachable-dtors.cpp b/test/Analysis/no-unreachable-dtors.cpp new file mode 100644 index 000000000000..e0893b3f4e62 --- /dev/null +++ b/test/Analysis/no-unreachable-dtors.cpp @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -analyze -analyzer-checker=debug.Stats -verify -Wno-unreachable-code %s + +struct S { + ~S(); +}; + +// the return at the end of an CompoundStmt does not lead to an unreachable block containing the dtors +void test() { // expected-warning-re{{test -> Total CFGBlocks: {{[0-9]+}} | Unreachable CFGBlocks: 0 | Exhausted Block: no | Empty WorkList: yes}} + S s; + return; +} |
