[RISCV] Simplify usage of SplatPat_simm5_plus1. NFC (#125340)
[llvm-project.git] / clang / test / Analysis / analyzer-display-progress.cpp
blobfa1860004d0319680512f5bad60c5471e286e20b
1 // RUN: %clang_analyze_cc1 -verify %s 2>&1 \
2 // RUN: -analyzer-display-progress \
3 // RUN: -analyzer-checker=debug.ExprInspection \
4 // RUN: -analyzer-output=text \
5 // RUN: | FileCheck %s
7 void clang_analyzer_warnIfReached();
9 // expected-note@+2 {{[debug] analyzing from f()}}
10 // expected-warning@+1 {{REACHABLE}} expected-note@+1 {{REACHABLE}}
11 void f() { clang_analyzer_warnIfReached(); }
13 // expected-note@+2 {{[debug] analyzing from g()}}
14 // expected-warning@+1 {{REACHABLE}} expected-note@+1 {{REACHABLE}}
15 void g() { clang_analyzer_warnIfReached(); }
17 // expected-note@+2 {{[debug] analyzing from h()}}
18 // expected-warning@+1 {{REACHABLE}} expected-note@+1 {{REACHABLE}}
19 void h() { clang_analyzer_warnIfReached(); }
21 struct SomeStruct {
22 // expected-note@+2 {{[debug] analyzing from SomeStruct::f()}}
23 // expected-warning@+1 {{REACHABLE}} expected-note@+1 {{REACHABLE}}
24 void f() { clang_analyzer_warnIfReached(); }
27 struct SomeOtherStruct {
28 // expected-note@+2 {{[debug] analyzing from SomeOtherStruct::f()}}
29 // expected-warning@+1 {{REACHABLE}} expected-note@+1 {{REACHABLE}}
30 void f() { clang_analyzer_warnIfReached(); }
33 namespace ns {
34 struct SomeStruct {
35 // expected-note@+2 {{[debug] analyzing from ns::SomeStruct::f(int)}}
36 // expected-warning@+1 {{REACHABLE}} expected-note@+1 {{REACHABLE}}
37 void f(int) { clang_analyzer_warnIfReached(); }
38 // expected-note@+2 {{[debug] analyzing from ns::SomeStruct::f(float, ::SomeStruct)}}
39 // expected-warning@+1 {{REACHABLE}} expected-note@+1 {{REACHABLE}}
40 void f(float, ::SomeStruct) { clang_analyzer_warnIfReached(); }
41 // expected-note@+2 {{[debug] analyzing from ns::SomeStruct::f(float, SomeStruct)}}
42 // expected-warning@+1 {{REACHABLE}} expected-note@+1 {{REACHABLE}}
43 void f(float, SomeStruct) { clang_analyzer_warnIfReached(); }
47 // CHECK: analyzer-display-progress.cpp f() : {{[0-9]+}}
48 // CHECK: analyzer-display-progress.cpp g() : {{[0-9]+}}
49 // CHECK: analyzer-display-progress.cpp h() : {{[0-9]+}}
50 // CHECK: analyzer-display-progress.cpp SomeStruct::f() : {{[0-9]+}}
51 // CHECK: analyzer-display-progress.cpp SomeOtherStruct::f() : {{[0-9]+}}
52 // CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(int) : {{[0-9]+}}
53 // CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(float, ::SomeStruct) : {{[0-9]+}}
54 // CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(float, SomeStruct) : {{[0-9]+}}