diff options
author | John McCall <rjmccall@apple.com> | 2010-03-10 11:27:22 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-03-10 11:27:22 +0000 |
commit | 7c2342dd4c9947806842e5aca3d2bb2e542853c9 (patch) | |
tree | 9791dad988e7ab05776a61a84c66234aeef17f31 /test/SemaCXX/conversion-function.cpp | |
parent | e5ea0cae7769866b5a5f9fa979e7c9d1d23a6bcc (diff) |
When pretty-printing tag types, only print the tag if we're in C (and
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).
Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98149 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/conversion-function.cpp')
-rw-r--r-- | test/SemaCXX/conversion-function.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/SemaCXX/conversion-function.cpp b/test/SemaCXX/conversion-function.cpp index 4fef172bd5..bca75c0b2f 100644 --- a/test/SemaCXX/conversion-function.cpp +++ b/test/SemaCXX/conversion-function.cpp @@ -49,9 +49,9 @@ class A { }; class B : public A { public: - operator A&() const; // expected-warning{{conversion function converting 'class B' to its base class 'class A' will never be used}} - operator const void() const; // expected-warning{{conversion function converting 'class B' to 'void const' will never be used}} - operator const B(); // expected-warning{{conversion function converting 'class B' to itself will never be used}} + operator A&() const; // expected-warning{{conversion function converting 'B' to its base class 'A' will never be used}} + operator const void() const; // expected-warning{{conversion function converting 'B' to 'void const' will never be used}} + operator const B(); // expected-warning{{conversion function converting 'B' to itself will never be used}} }; // This used to crash Clang. @@ -63,7 +63,7 @@ struct Flop { // expected-note{{candidate is the implicit copy constructor}} struct Flip { operator Flop() const; // expected-note{{candidate function}} }; -Flop flop = Flip(); // expected-error {{conversion from 'struct Flip' to 'struct Flop' is ambiguous}} +Flop flop = Flip(); // expected-error {{conversion from 'Flip' to 'Flop' is ambiguous}} // This tests that we don't add the second conversion declaration to the list of user conversions struct C { @@ -88,7 +88,7 @@ public: }; void f(Yb& a) { - if (a) { } // expected-error {{conversion from 'class Yb' to 'bool' is ambiguous}} + if (a) { } // expected-error {{conversion from 'Yb' to 'bool' is ambiguous}} int i = a; // OK. calls XB::operator int(); char ch = a; // OK. calls Yb::operator char(); } |