
This reverts commit 4c80193a58a5c24e2bbebe291feb406191c4e2ab. This relands the commit. The issues have theoretically been fixed.
17 lines
564 B
C
17 lines
564 B
C
// RUN: rm -rf %t.dir/ctudir
|
|
// RUN: mkdir -p %t.dir/ctudir
|
|
// RUN: %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config ctu-dir=%t.dir/ctudir -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
struct S {
|
|
void (*fp)(void);
|
|
};
|
|
|
|
int main(void) {
|
|
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();
|
|
}
|