1 // RUN: %clang_analyze_cc1 -analyzer-checker=debug.AnalysisOrder -analyzer-config c++-allocator-inlining=false,debug.AnalysisOrder:PreStmtCXXNewExpr=true,debug.AnalysisOrder:PostStmtCXXNewExpr=true,debug.AnalysisOrder:PreCall=true,debug.AnalysisOrder:PostCall=true,debug.AnalysisOrder:NewAllocator=true %s 2>&1 | FileCheck %s
2 
3 #include "Inputs/system-header-simulator-cxx.h"
4 
5 namespace std {
6   void *malloc(size_t);
7 }
8 
operator new(size_t size)9 void *operator new(size_t size) { return std::malloc(size); }
10 
11 struct S {
SS12   S() {}
13 };
14 
15 void foo();
16 
test()17 void test() {
18   S *s = new S();
19   foo();
20 }
21 
22 // CHECK:      PreCall (S::S)
23 // CHECK-NEXT: PostCall (S::S)
24 // CHECK-NEXT: PreStmt<CXXNewExpr>
25 // CHECK-NEXT: PostStmt<CXXNewExpr>
26 // CHECK-NEXT: PreCall (foo)
27 // CHECK-NEXT: PostCall (foo)
28 // CHECK-NEXT: PreCall (std::malloc)
29 // CHECK-NEXT: PostCall (std::malloc)
30