diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-15 22:15:23 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-15 22:15:23 +0000 |
commit | adcea10410d0baf558cd13761538c8c28323ed98 (patch) | |
tree | 2511460bf0d5707eb489625447df727dde6ce215 /clang/test/SemaCXX/conversion-delete-expr.cpp | |
parent | 1f4ec5c4c6a3023ba5fe35707cf593873ac8332c (diff) | |
download | bcm5719-llvm-adcea10410d0baf558cd13761538c8c28323ed98.tar.gz bcm5719-llvm-adcea10410d0baf558cd13761538c8c28323ed98.zip |
1) don't do overload resolution in selecting conversion
to pointer function for delete expression. 2)
Treat type conversion function and its 'const' version
as identical in building the visible conversion list.
llvm-svn: 81930
Diffstat (limited to 'clang/test/SemaCXX/conversion-delete-expr.cpp')
-rw-r--r-- | clang/test/SemaCXX/conversion-delete-expr.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/test/SemaCXX/conversion-delete-expr.cpp b/clang/test/SemaCXX/conversion-delete-expr.cpp index 63a9765396d..708289c362d 100644 --- a/clang/test/SemaCXX/conversion-delete-expr.cpp +++ b/clang/test/SemaCXX/conversion-delete-expr.cpp @@ -78,19 +78,18 @@ void f5(X1 x) { delete x; } // OK. In selecting a conversion to pointer functio // Test7 struct Base { - operator int*(); // expected-note {{candidate function}} + operator int*(); }; struct Derived : Base { // not the same function as Base's non-const operator int() - operator int*() const; // expected-note {{candidate function}} + operator int*() const; }; void foo6(const Derived cd, Derived d) { // overload resolution selects Derived::operator int*() const; delete cd; - - delete d; // expected-error {{ambiguous conversion of delete expression of type 'struct Derived' to a pointer}} + delete d; } // Test8 |