From ccc11811052db89421ed8f7cdc42af4dda7f7f94 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 21 May 2013 19:05:48 +0000 Subject: Refactor places which perform contextual implicit conversions to go through a common function. The C++1y contextual implicit conversion rules themselves are not yet implemented, however. This also fixes a subtle bug where template instantiation context notes were dropped for diagnostics coming from conversions for integral constant expressions -- we were implicitly slicing a SemaDiagnosticBuilder into a DiagnosticBuilder when producing these diagnostics, and losing their context notes in the process. llvm-svn: 182406 --- clang/test/SemaCXX/explicit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/test/SemaCXX/explicit.cpp') diff --git a/clang/test/SemaCXX/explicit.cpp b/clang/test/SemaCXX/explicit.cpp index 5ce2cf19132..905cbdcd0c7 100644 --- a/clang/test/SemaCXX/explicit.cpp +++ b/clang/test/SemaCXX/explicit.cpp @@ -145,14 +145,14 @@ namespace Conversion { operator int*(); }; struct NotPtr { - explicit operator int*(); + explicit operator int*(); // expected-note {{conversion}} }; Ptr p; NotPtr np; delete p; - delete np; // expected-error {{cannot delete expression of type 'NotPtr'}} + delete np; // expected-error {{converting delete expression from type 'NotPtr' to type 'int *' invokes an explicit conversion function}} } void testFunctionPointer() -- cgit v1.2.3