test.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. static_assert(Ch1 == 'a');
  5. static_assert(Ch2 == 'b');
  6. static_assert(Ch3 == 'c');
  7. static_assert(Ch4 == L'd');
  8. static_assert(Ch5 == L'e');
  9. static_assert(Ch6 == L'f');
  10. static_assert(C1 == 12);
  11. static_assert(C2 == 13);
  12. static_assert(C3 == 12);
  13. static_assert(C4 == 13);
  14. static_assert(C5 == 22L);
  15. static_assert(C6 == 23L);
  16. static_assert(C7 == 66LL);
  17. static_assert(C8 == 67ULL);
  18. static_assert(bval1 == true);
  19. static_assert(bval2 == false);
  20. static_assert(ExpressionTrait == false);
  21. static_assert(ArrayRank == 2);
  22. static_assert(ArrayExtent == 20);
  23. void testImport(int *x, const S1 &cs1, S1 &s1) {
  24. testNewThrowDelete();
  25. testArrayElement(nullptr, 12);
  26. testTernaryOp(0, 1, 2);
  27. testConstCast(cs1);
  28. testStaticCast(s1);
  29. testReinterpretCast(s1);
  30. testDynamicCast(s1);
  31. testScalarInit(42);
  32. testOffsetOf();
  33. testDefaultArg(12);
  34. useTemplateType();
  35. }