diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-05-21 19:05:48 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-05-21 19:05:48 +0000 |
commit | ccc11811052db89421ed8f7cdc42af4dda7f7f94 (patch) | |
tree | bfc36c38ea792eafcca74d5eb5f318e2830c43b9 /clang/test/SemaCXX/conversion-delete-expr.cpp | |
parent | c823f00ed150dc049b1d27532a06781f297dea17 (diff) | |
download | bcm5719-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/conversion-delete-expr.cpp')
-rw-r--r-- | clang/test/SemaCXX/conversion-delete-expr.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/clang/test/SemaCXX/conversion-delete-expr.cpp b/clang/test/SemaCXX/conversion-delete-expr.cpp index 0f298a819fa..a1ddeb2689a 100644 --- a/clang/test/SemaCXX/conversion-delete-expr.cpp +++ b/clang/test/SemaCXX/conversion-delete-expr.cpp @@ -2,11 +2,11 @@ // Test1 struct B { - operator char *(); // expected-note {{candidate function}} + operator char *(); // expected-note {{conversion to pointer type}} }; struct D : B { - operator int *(); // expected-note {{candidate function}} + operator int *(); // expected-note {{conversion to pointer type}} }; void f (D d) @@ -30,11 +30,11 @@ void f1 (D1 d) // Test3 struct B2 { - operator const int *(); // expected-note {{candidate function}} + operator const int *(); // expected-note {{conversion to pointer type}} }; struct D2 : B2 { - operator int *(); // expected-note {{candidate function}} + operator int *(); // expected-note {{conversion to pointer type}} }; void f2 (D2 d) @@ -44,11 +44,11 @@ void f2 (D2 d) // Test4 struct B3 { - operator const int *(); // expected-note {{candidate function}} + operator const int *(); // expected-note {{conversion to pointer type}} }; struct A3 { - operator const int *(); // expected-note {{candidate function}} + operator const int *(); // expected-note {{conversion to pointer type}} }; struct D3 : A3, B3 { @@ -78,7 +78,7 @@ void f5(X1 x) { delete x; } // OK. In selecting a conversion to pointer functio // Test7 struct Base { - operator int*(); + operator int*(); }; struct Derived : Base { @@ -87,9 +87,9 @@ struct Derived : Base { }; void foo6(const Derived cd, Derived d) { - // overload resolution selects Derived::operator int*() const; - delete cd; - delete d; + // overload resolution selects Derived::operator int*() const; + delete cd; + delete d; } // Test8 @@ -104,6 +104,6 @@ struct DD : BB { void foo7 (DD d) { - // OK. In selecting a conversion to pointer function, template convesions are skipped. - delete d; + // OK. In selecting a conversion to pointer function, template convesions are skipped. + delete d; } |