aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp')
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp
index 16a09d836d16..fcc1334b1506 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -verify %s
-// XFAIL: *
class A {
public:
@@ -7,7 +6,11 @@ public:
explicit operator int(); // expected-warning {{explicit conversion functions are a C++0x extension}}
- explicit void f0(); // expected-error {{'explicit' cannot only be applied to constructor or conversion function}}
+ explicit void f0(); // expected-error {{'explicit' can only be applied to a constructor or conversion function}}
+
+ operator bool();
};
-explicit A::A() { } // expected-error {{'explicit' cannot be specified outside class definition}}
+explicit A::A() { } // expected-error {{'explicit' can only be specified inside the class definition}}
+explicit A::operator bool() { return false; } // expected-warning {{explicit conversion functions are a C++0x extension}}\
+ // expected-error {{'explicit' can only be specified inside the class definition}}