xref: /llvm-project/clang/test/ASTMerge/exprs-cpp/test.cpp (revision ee6d3fa07eed0d3187ded0cbc63fdbbdc4a8480c)
1 // RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -fcxx-exceptions -emit-pch -o %t.1.ast %S/Inputs/exprs3.cpp
2 // RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -fcxx-exceptions -ast-merge %t.1.ast -fsyntax-only -verify %s
3 // expected-no-diagnostics
4 
5 static_assert(Ch1 == 'a');
6 static_assert(Ch2 == 'b');
7 static_assert(Ch3 == 'c');
8 
9 static_assert(Ch4 == L'd');
10 static_assert(Ch5 == L'e');
11 static_assert(Ch6 == L'f');
12 
13 static_assert(C1 == 12);
14 static_assert(C2 == 13);
15 
16 static_assert(C3 == 12);
17 static_assert(C4 == 13);
18 
19 static_assert(C5 == 22L);
20 static_assert(C6 == 23L);
21 
22 static_assert(C7 == 66LL);
23 static_assert(C8 == 67ULL);
24 
25 static_assert(bval1 == true);
26 static_assert(bval2 == false);
27 
28 static_assert(ExpressionTrait == false);
29 
30 static_assert(ArrayRank == 2);
31 static_assert(ArrayExtent == 20);
32 
33 void testImport(int *x, const S1 &cs1, S1 &s1) {
34   testNewThrowDelete();
35   testArrayElement(nullptr, 12);
36   testTernaryOp(0, 1, 2);
37   testConstCast(cs1);
38   testStaticCast(s1);
39   testReinterpretCast(s1);
40   testDynamicCast(s1);
41   testScalarInit(42);
42   testOffsetOf();
43   testDefaultArg(12);
44   useTemplateType();
45 }
46