bolt/deps/llvm-18.1.8/clang/test/Analysis/PR60412.cpp
2025-02-14 19:21:04 +01:00

18 lines
295 B
C++

// 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
}