[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / cxx11-type-specifier.cpp
blob845e0d87c8ea28859920e7698ae14ba4af1729d4
1 // RUN: %clang_cc1 -verify %s -std=c++11 -fcxx-exceptions
3 // Tests for parsing of type-specifier-seq
5 struct S {
6 operator constexpr int(); // expected-error{{type name does not allow constexpr}}
7 };
8 enum E { e };
10 void 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}}
16 (void) new struct S {};
17 (void) new enum E { e };
20 // And for trailing-type-specifier-seq
22 auto f() -> unknown; // expected-error{{unknown type name 'unknown'}}