summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/explicit.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-02-10 17:21:40 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-02-10 17:21:40 +0000
commit36be8d83067e5df18f1f7833e8b2ef90c4003fec (patch)
tree72b924ceb088c72a46789293ff972e8445a1c674 /clang/test/SemaCXX/explicit.cpp
parentcfb40600e981b5ef8a46c8cdd18cf7b1f25e9d07 (diff)
downloadbcm5719-llvm-36be8d83067e5df18f1f7833e8b2ef90c4003fec.tar.gz
bcm5719-llvm-36be8d83067e5df18f1f7833e8b2ef90c4003fec.zip
PR18777: This PR is already fixed; add regtest.
llvm-svn: 201100
Diffstat (limited to 'clang/test/SemaCXX/explicit.cpp')
-rw-r--r--clang/test/SemaCXX/explicit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/explicit.cpp b/clang/test/SemaCXX/explicit.cpp
index 1c4d7704511..aa28bd85af4 100644
--- a/clang/test/SemaCXX/explicit.cpp
+++ b/clang/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}}
+}
OpenPOWER on IntegriCloud