blob: da56c68cafc55f58f6c0c2455198f75b9233a31a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.deadcode.UnreachableCode -verify %s
// expected-no-diagnostics
struct Test {
Test() {}
~Test();
};
int foo() {
struct a {
Test b, c;
} d;
return 1;
}
int main() {
if (foo()) return 1; // <- this used to warn as unreachable
}
|