xref: /aosp_15_r20/external/clang/test/Analysis/no-unreachable-dtors.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -analyze -analyzer-checker=debug.Stats -verify -Wno-unreachable-code %s
2*67e74705SXin Li 
3*67e74705SXin Li struct S {
4*67e74705SXin Li   ~S();
5*67e74705SXin Li };
6*67e74705SXin Li 
7*67e74705SXin Li // the return at the end of an CompoundStmt does not lead to an unreachable block containing the dtors
test()8*67e74705SXin Li void test() { // expected-warning-re{{test -> Total CFGBlocks: {{[0-9]+}} | Unreachable CFGBlocks: 0 | Exhausted Block: no | Empty WorkList: yes}}
9*67e74705SXin Li   S s;
10*67e74705SXin Li   return;
11*67e74705SXin Li }
12