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.
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]
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]