1 // RUN: %clang_cc1 -verify -std=c++0x %s
2 // RUN: cp %s %t
3 // RUN: %clang_cc1 -x c++ -std=c++0x -fixit %t || true
4 // RUN: %clang_cc1 -Wall -pedantic -x c++ -std=c++0x %t
5
6 /* This is a test of the various code modification hints that only
7 apply in C++0x. */
8 struct A {
9 explicit operator int(); // expected-note{{conversion to integral type}}
10 };
11
x()12 void x() {
13 switch(A()) { // expected-error{{explicit conversion to}}
14 }
15 }
16
17 using ::T = void; // expected-error {{name defined in alias declaration must be an identifier}}
18 using typename U = void; // expected-error {{name defined in alias declaration must be an identifier}}
19 using typename ::V = void; // expected-error {{name defined in alias declaration must be an identifier}}
20