brintos

brintos / llvm-project-archived public Read only

0
0
Text · 576 B · 845e0d8 Raw
23 lines · cpp
1// RUN: %clang_cc1 -verify %s -std=c++11 -fcxx-exceptions2 3// Tests for parsing of type-specifier-seq4 5struct S {6  operator constexpr int(); // expected-error{{type name does not allow constexpr}}7};8enum E { e };9 10void f() {11  try {12    (void) new constexpr int; // expected-error{{type name does not allow constexpr}}13  } catch (constexpr int) { // expected-error{{type name does not allow constexpr}}14  }15 16  (void) new struct S {};17  (void) new enum E { e };18}19 20// And for trailing-type-specifier-seq21 22auto f() -> unknown; // expected-error{{unknown type name 'unknown'}}23