xref: /llvm-project/clang/test/Analysis/PR60412.cpp (revision d65379c8d4768ddae143672f5d4827acafe22553)
1 // RUN: %clang_analyze_cc1 -analyzer-checker=alpha.deadcode.UnreachableCode -verify %s
2 // expected-no-diagnostics
3 
4 struct Test {
TestTest5   Test() {}
6   ~Test();
7 };
8 
foo()9 int foo() {
10   struct a {
11     Test b, c;
12   } d;
13   return 1;
14 }
15 
main()16 int main() {
17   if (foo()) return 1; // <- this used to warn as unreachable
18 }
19