summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/explicit.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-05-21 19:05:48 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-05-21 19:05:48 +0000
commitccc11811052db89421ed8f7cdc42af4dda7f7f94 (patch)
treebfc36c38ea792eafcca74d5eb5f318e2830c43b9 /clang/test/SemaCXX/explicit.cpp
parentc823f00ed150dc049b1d27532a06781f297dea17 (diff)
downloadbcm5719-llvm-ccc11811052db89421ed8f7cdc42af4dda7f7f94.tar.gz
bcm5719-llvm-ccc11811052db89421ed8f7cdc42af4dda7f7f94.zip
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
Diffstat (limited to 'clang/test/SemaCXX/explicit.cpp')
-rw-r--r--clang/test/SemaCXX/explicit.cpp4
1 files changed, 2 insertions, 2 deletions
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()
OpenPOWER on IntegriCloud