Gabor Horvath | ca7923a | 2018-04-13 12:36:08 +0000 | [diff] [blame] | 1 | // 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 | |
| 4 | struct S { |
| 5 | void (*fp)(); |
| 6 | }; |
| 7 | |
| 8 | int 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 | } |