19 lines · cpp
1// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.deadcode.UnreachableCode -verify %s2// expected-no-diagnostics3 4struct Test {5 Test() {}6 ~Test();7};8 9int foo() {10 struct a {11 Test b, c;12 } d;13 return 1;14}15 16int main() {17 if (foo()) return 1; // <- this used to warn as unreachable18}19