2010-04-24 01:30:46 +00:00
|
|
|
// RUN: %clang_cc1 -verify -std=c++0x %s
|
|
|
|
// RUN: cp %s %t
|
2011-09-06 03:01:15 +00:00
|
|
|
// RUN: not %clang_cc1 -x c++ -std=c++0x -fixit %t
|
2010-04-24 01:30:46 +00:00
|
|
|
// RUN: %clang_cc1 -Wall -pedantic -x c++ -std=c++0x %t
|
2009-11-23 13:46:08 +00:00
|
|
|
|
|
|
|
/* This is a test of the various code modification hints that only
|
|
|
|
apply in C++0x. */
|
2010-04-24 01:30:46 +00:00
|
|
|
struct A {
|
2009-11-23 13:46:08 +00:00
|
|
|
explicit operator int(); // expected-note{{conversion to integral type}}
|
|
|
|
};
|
|
|
|
|
2010-04-24 01:30:46 +00:00
|
|
|
void x() {
|
2009-11-23 13:46:08 +00:00
|
|
|
switch(A()) { // expected-error{{explicit conversion to}}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-04-15 14:24:37 +00:00
|
|
|
using ::T = void; // expected-error {{name defined in alias declaration must be an identifier}}
|
|
|
|
using typename U = void; // expected-error {{name defined in alias declaration must be an identifier}}
|
|
|
|
using typename ::V = void; // expected-error {{name defined in alias declaration must be an identifier}}
|