From 36be8d83067e5df18f1f7833e8b2ef90c4003fec Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 10 Feb 2014 17:21:40 +0000 Subject: [PATCH] PR18777: This PR is already fixed; add regtest. llvm-svn: 201100 --- clang/test/SemaCXX/explicit.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang/test/SemaCXX/explicit.cpp b/clang/test/SemaCXX/explicit.cpp index 1c4d7704511b..aa28bd85af46 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}} +}