summaryrefslogtreecommitdiffstats
path: root/test/FixIt/fixit-cxx0x.cpp
blob: 77e9e5815c2f90e4ce9b46a9dc1a26271ae19584 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: %clang_cc1 -verify -std=c++0x %s
// RUN: cp %s %t
// RUN: %clang_cc1 -x c++ -std=c++0x -fixit %t || true
// RUN: %clang_cc1 -Wall -pedantic -x c++ -std=c++0x %t

/* This is a test of the various code modification hints that only
   apply in C++0x. */
struct A {
  explicit operator int(); // expected-note{{conversion to integral type}}
};

void x() {
  switch(A()) { // expected-error{{explicit conversion to}}
  }
}

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}}
OpenPOWER on IntegriCloud