blob: 35c0b685ce7e133c36ca1a44c0f8e5f2460bcd90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// RUN: %clang_cc1 -fsyntax-only -analyze -analyzer-checker=debug.ExprInspection -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config ctu-dir=%T/ctudir -verify %s
// expected-no-diagnostics
struct S {
void (*fp)();
};
int main() {
struct S s;
// This will cause the analyzer to look for a function definition that has
// no FunctionDecl. It used to cause a crash in AnyFunctionCall::getRuntimeDefinition.
// It would only occur when CTU analysis is enabled.
s.fp();
}
|