[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / test / Analysis / ctu-onego-small.cpp
blobc228757bb18eb8abb3cb7d6f810ea6bd2f2612ed
1 // RUN: rm -rf %t && mkdir %t
2 // RUN: mkdir -p %t/ctudir
3 // RUN: %clang_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \
4 // RUN: -emit-pch -o %t/ctudir/ctu-onego-small-other.cpp.ast %S/Inputs/ctu-onego-small-other.cpp
5 // RUN: cp %S/Inputs/ctu-onego-small-other.cpp.externalDefMap.ast-dump.txt %t/ctudir/externalDefMap.txt
7 // Small function defined in another TU.
8 int bar();
10 // Here we limit the ctu analysis to the first phase only (via the
11 // ctu-max-nodes config options). And we check whether the small foreign
12 // function `bar` is inlined.
14 // RUN: %clang_analyze_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \
15 // RUN: -analyzer-checker=core,debug.ExprInspection \
16 // RUN: -analyzer-config eagerly-assume=false \
17 // RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \
18 // RUN: -analyzer-config ctu-dir=%t/ctudir \
19 // RUN: -analyzer-config display-ctu-progress=true \
20 // RUN: -analyzer-display-progress \
21 // RUN: -analyzer-config ctu-max-nodes-pct=0 \
22 // RUN: -analyzer-config ctu-max-nodes-min=0 2>&1 %s | FileCheck %s
23 // CHECK: ANALYZE (Path, Inline_Regular): {{.*}} baruser(int){{.*}}CTU loaded AST file
25 // RUN: %clang_analyze_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \
26 // RUN: -analyzer-checker=core,debug.ExprInspection \
27 // RUN: -analyzer-config eagerly-assume=false \
28 // RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \
29 // RUN: -analyzer-config ctu-dir=%t/ctudir \
30 // RUN: -analyzer-config ctu-max-nodes-pct=0 \
31 // RUN: -analyzer-config ctu-phase1-inlining=none \
32 // RUN: -analyzer-config ctu-max-nodes-min=0 -verify=inline-none %s
34 // RUN: %clang_analyze_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \
35 // RUN: -analyzer-checker=core,debug.ExprInspection \
36 // RUN: -analyzer-config eagerly-assume=false \
37 // RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \
38 // RUN: -analyzer-config ctu-dir=%t/ctudir \
39 // RUN: -analyzer-config ctu-max-nodes-pct=0 \
40 // RUN: -analyzer-config ctu-phase1-inlining=small \
41 // RUN: -analyzer-config ctu-max-nodes-min=0 -verify=inline-small %s
44 void clang_analyzer_eval(int);
46 void baruser(int x) {
47 int y = bar();
48 // inline-none-warning@+2{{UNKNOWN}}
49 // inline-small-warning@+1{{TRUE}}
50 clang_analyzer_eval(y == 0);