Aleksei Sidorin | a693b37 | 2016-09-28 10:16:56 +0000 | [diff] [blame] | 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 | |
Aleksei Sidorin | 8fc8510 | 2018-01-26 11:36:54 +0000 | [diff] [blame] | 33 | static_assert(testLambdaAdd(3) == 6); |
| 34 | |
Aleksei Sidorin | a693b37 | 2016-09-28 10:16:56 +0000 | [diff] [blame] | 35 | void 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 Sidorin | 55a6350 | 2017-02-20 11:57:12 +0000 | [diff] [blame] | 46 | testDefaultArg(); |
| 47 | testDefaultArgExpr(); |
Aleksei Sidorin | a693b37 | 2016-09-28 10:16:56 +0000 | [diff] [blame] | 48 | useTemplateType(); |
Aleksei Sidorin | 8fc8510 | 2018-01-26 11:36:54 +0000 | [diff] [blame] | 49 | TestLambdaTemplate<int>(1, 2).testLambda(3); |
Aleksei Sidorin | a693b37 | 2016-09-28 10:16:56 +0000 | [diff] [blame] | 50 | } |