| 1 |
// RUN: rm -rf %t && mkdir %t |
| 2 |
// RUN: mkdir -p %t/ctudir2 |
| 3 |
// RUN: %clang_cc1 \ |
| 4 |
// RUN: -emit-pch -o %t/ctudir2/ctu-import.c.ast %S/Inputs/ctu-import.c |
| 5 |
// RUN: cp %S/Inputs/ctu-import.c.externalDefMap.ast-dump.txt %t/ctudir2/externalDefMap.txt |
| 6 |
// RUN: %clang_analyze_cc1 \ |
| 7 |
// RUN: -analyzer-checker=core,debug.ExprInspection \ |
| 8 |
// RUN: -analyzer-config eagerly-assume=false \ |
| 9 |
// RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \ |
| 10 |
// RUN: -analyzer-config display-ctu-progress=true \ |
| 11 |
// RUN: -analyzer-config ctu-dir=%t/ctudir2 \ |
| 12 |
// RUN: -verify %s |
| 13 |
|
| 14 |
void clang_analyzer_eval(int); |
| 15 |
|
| 16 |
int testStaticImplicit(void); |
| 17 |
int func(void) { |
| 18 |
int ret = testStaticImplicit(); |
| 19 |
clang_analyzer_eval(ret == 4); // expected-warning{{TRUE}} ctu |
| 20 |
// expected-warning@-1{{UNKNOWN}} stu |
| 21 |
return testStaticImplicit(); |
| 22 |
} |