brintos

brintos / llvm-project-archived public Read only

0
0
Text · 779 B · d8f7f5d Raw
28 lines · cpp
1// Test this without pch.2// RUN: %clang_cc1 -x c++ -std=c++26 -include %S/Inputs/type_aware_destroying_new_delete.h -emit-llvm -o - %s3 4// Test with pch.5// RUN: %clang_cc1 -x c++ -std=c++26 -emit-pch -o %t %S/Inputs/type_aware_destroying_new_delete.h6// RUN: %clang_cc1 -x c++ -std=c++26 -include-pch %t -emit-llvm -o - %s 7 8// RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -fpch-instantiate-templates -o %t %S/Inputs/type_aware_destroying_new_delete.h9// RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -emit-llvm -o - %s10 11 12static void call_in_pch_function(void) {13    in_pch_tests();14}15 16void out_of_pch_tests() {17    A* a = new A;18    delete a;19    B *b = new B;20    delete b;21    C *c = new C;22    delete c;23    D *d = new D;24    delete d;25    E *e = new E;26    delete e;27}28