51 lines · cpp
1// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -fcxx-exceptions -Wno-signed-unsigned-wchar -emit-pch -o %t.1.ast %S/Inputs/exprs3.cpp2// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -fcxx-exceptions -Wno-signed-unsigned-wchar -ast-merge %t.1.ast -fsyntax-only -verify %s3// expected-no-diagnostics4 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 33static_assert(testLambdaAdd(3) == 6);34 35void 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);46 testDefaultArg();47 testDefaultArgExpr();48 useTemplateType();49 TestLambdaTemplate<int>(1, 2).testLambda(3);50}51