aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/explicit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/explicit.cpp')
-rw-r--r--test/SemaCXX/explicit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/explicit.cpp b/test/SemaCXX/explicit.cpp
index 1c4d7704511b..aa28bd85af46 100644
--- a/test/SemaCXX/explicit.cpp
+++ b/test/SemaCXX/explicit.cpp
@@ -246,3 +246,8 @@ namespace pr8264 {
explicit explicit Test(int x); // expected-warning{{duplicate 'explicit' declaration specifier}}
};
}
+
+namespace PR18777 {
+ struct S { explicit operator bool() const; } s;
+ int *p = new int(s); // expected-error {{no viable conversion}}
+}