[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / cxxctr-evalcall-analysis-order.cpp
blob0e1ec2f9de56684c153e55c583a01de7b9131c5e
1 // RUN: %clang_analyze_cc1 %s \
2 // RUN: -analyzer-checker=debug.AnalysisOrder \
3 // RUN: -analyzer-config debug.AnalysisOrder:EvalCall=true \
4 // RUN: -analyzer-config debug.AnalysisOrder:PreCall=true \
5 // RUN: -analyzer-config debug.AnalysisOrder:PostCall=true \
6 // RUN: 2>&1 | FileCheck %s
8 // This test ensures that eval::Call event will be triggered for constructors.
10 class C {
11 public:
12 C(){};
13 C(int x){};
14 C(int x, int y){};
17 void foo() {
18 C C0;
19 C C1(42);
20 C *C2 = new C{2, 3};
23 // CHECK: PreCall (C::C) [CXXConstructorCall]
24 // CHECK-NEXT: EvalCall (C::C) {argno: 0} [CXXConstructorCall]
25 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
26 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
27 // CHECK-NEXT: EvalCall (C::C) {argno: 1} [CXXConstructorCall]
28 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
29 // CHECK-NEXT: PreCall (operator new) [CXXAllocatorCall]
30 // CHECK-NEXT: PostCall (operator new) [CXXAllocatorCall]
31 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
32 // CHECK-NEXT: EvalCall (C::C) {argno: 2} [CXXConstructorCall]
33 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]