blob: d8a858d9da74ef1b4d5c1c001f75ce6977a8a081 [file] [log] [blame]
Nick Lewyckyba5f6ec2010-04-24 01:30:46 +00001// RUN: %clang_cc1 -verify -std=c++0x %s
2// RUN: cp %s %t
3// RUN: %clang_cc1 -std=c++0x -fixit %t || true
4// RUN: %clang_cc1 -Wall -pedantic -x c++ -std=c++0x %t
Douglas Gregor84fb9c02009-11-23 13:46:08 +00005
6/* This is a test of the various code modification hints that only
7 apply in C++0x. */
Nick Lewyckyba5f6ec2010-04-24 01:30:46 +00008struct A {
Douglas Gregor84fb9c02009-11-23 13:46:08 +00009 explicit operator int(); // expected-note{{conversion to integral type}}
10};
11
Nick Lewyckyba5f6ec2010-04-24 01:30:46 +000012void x() {
Douglas Gregor84fb9c02009-11-23 13:46:08 +000013 switch(A()) { // expected-error{{explicit conversion to}}
14 }
15}
16