isuckatcs d65379c8d4 [analyzer] Remove the loop from the exploded graph caused by missing information in program points
This patch adds CFGElementRef to ProgramPoints
and helps the analyzer to differentiate between
two otherwise identically looking ProgramPoints.

Fixes #60412

Differential Revision: https://reviews.llvm.org/D143328
2023-03-04 02:01:45 +01:00

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