blob: 35c0b685ce7e133c36ca1a44c0f8e5f2460bcd90 [file] [log] [blame]
Gabor Horvathca7923a2018-04-13 12:36:08 +00001// 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
2// expected-no-diagnostics
3
4struct S {
5 void (*fp)();
6};
7
8int main() {
9 struct S s;
10 // This will cause the analyzer to look for a function definition that has
11 // no FunctionDecl. It used to cause a crash in AnyFunctionCall::getRuntimeDefinition.
12 // It would only occur when CTU analysis is enabled.
13 s.fp();
14}