[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Analysis / cxxctr-array-evalcall-analysis-order.cpp
blob808d1f61573ff5f6785bc6a9d1694fc1ca773691
1 // RUN: %clang_analyze_cc1 %s \
2 // RUN: -analyzer-checker=debug.AnalysisOrder \
3 // RUN: -analyzer-config debug.AnalysisOrder:PreCall=true \
4 // RUN: -analyzer-config debug.AnalysisOrder:PostCall=true \
5 // RUN: 2>&1 | FileCheck %s
7 // This test ensures that eval::Call event will be triggered for constructors.
9 class C {
10 public:
11 C(){};
14 void stack() {
15 C arr[4];
16 C *arr2 = new C[4];
17 C arr3[2][2];
20 // C arr[4];
21 // CHECK: PreCall (C::C) [CXXConstructorCall]
22 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
23 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
24 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
25 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
26 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
27 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
28 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
30 // C *arr2 = new C[4];
31 // CHECK-NEXT: PreCall (operator new[]) [CXXAllocatorCall]
32 // CHECK-NEXT: PostCall (operator new[]) [CXXAllocatorCall]
33 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
34 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
35 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
36 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
37 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
38 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
39 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
40 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
42 // C arr3[2][2];
43 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
44 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
45 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
46 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
47 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
48 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]
49 // CHECK-NEXT: PreCall (C::C) [CXXConstructorCall]
50 // CHECK-NEXT: PostCall (C::C) [CXXConstructorCall]