aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/no-unreachable-dtors.cpp
blob: e0893b3f4e6290f79583d29927f05bb1a90421a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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;
}