blob: c0b282ec0288acf5f7eeeabc49d76f4b3a455be3 [file] [log] [blame]
Aleksei Sidorina693b372016-09-28 10:16:56 +00001// 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
5static_assert(Ch1 == 'a');
6static_assert(Ch2 == 'b');
7static_assert(Ch3 == 'c');
8
9static_assert(Ch4 == L'd');
10static_assert(Ch5 == L'e');
11static_assert(Ch6 == L'f');
12
13static_assert(C1 == 12);
14static_assert(C2 == 13);
15
16static_assert(C3 == 12);
17static_assert(C4 == 13);
18
19static_assert(C5 == 22L);
20static_assert(C6 == 23L);
21
22static_assert(C7 == 66LL);
23static_assert(C8 == 67ULL);
24
25static_assert(bval1 == true);
26static_assert(bval2 == false);
27
28static_assert(ExpressionTrait == false);
29
30static_assert(ArrayRank == 2);
31static_assert(ArrayExtent == 20);
32
Aleksei Sidorin8fc85102018-01-26 11:36:54 +000033static_assert(testLambdaAdd(3) == 6);
34
Aleksei Sidorina693b372016-09-28 10:16:56 +000035void testImport(int *x, const S1 &cs1, S1 &s1) {
36 testNewThrowDelete();
37 testArrayElement(nullptr, 12);
38 testTernaryOp(0, 1, 2);
39 testConstCast(cs1);
40 testStaticCast(s1);
41 testReinterpretCast(s1);
42 testDynamicCast(s1);
43 testScalarInit(42);
44 testOffsetOf();
45 testDefaultArg(12);
Aleksei Sidorin55a63502017-02-20 11:57:12 +000046 testDefaultArg();
47 testDefaultArgExpr();
Aleksei Sidorina693b372016-09-28 10:16:56 +000048 useTemplateType();
Aleksei Sidorin8fc85102018-01-26 11:36:54 +000049 TestLambdaTemplate<int>(1, 2).testLambda(3);
Aleksei Sidorina693b372016-09-28 10:16:56 +000050}