diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-03-10 17:45:58 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-03-10 17:45:58 +0000 |
commit | 27c39af73c0d7d0b97e57b3a905040d4cefc9708 (patch) | |
tree | 56c1dd85a159948815817b5a90bedb39cf9ad105 /test/SemaCXX/dynamic-cast.cpp | |
parent | d2e6cf1d1c6468396ec057119c32aa58b1ee5ac9 (diff) | |
download | FreeBSD-src-27c39af73c0d7d0b97e57b3a905040d4cefc9708.zip FreeBSD-src-27c39af73c0d7d0b97e57b3a905040d4cefc9708.tar.gz |
Update clang to r98164.
Diffstat (limited to 'test/SemaCXX/dynamic-cast.cpp')
-rw-r--r-- | test/SemaCXX/dynamic-cast.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/SemaCXX/dynamic-cast.cpp b/test/SemaCXX/dynamic-cast.cpp index 53d0b9d..b73e8c5 100644 --- a/test/SemaCXX/dynamic-cast.cpp +++ b/test/SemaCXX/dynamic-cast.cpp @@ -8,7 +8,7 @@ struct D : private A {}; struct E : A {}; struct F : B, E {}; -struct Incomplete; // expected-note 2 {{forward declaration of 'struct Incomplete'}} +struct Incomplete; // expected-note 2 {{forward declaration of 'Incomplete'}} struct Poly { @@ -22,7 +22,7 @@ struct PolyDerived : Poly void basic_bad() { // ptr -> nonptr - (void)dynamic_cast<A>((A*)0); // expected-error {{'struct A' is not a reference or pointer}} + (void)dynamic_cast<A>((A*)0); // expected-error {{'A' is not a reference or pointer}} // nonptr -> ptr (void)dynamic_cast<A*>(0); // expected-error {{'int' is not a pointer}} // ptr -> noncls @@ -34,9 +34,9 @@ void basic_bad() // noncls -> ref (void)dynamic_cast<A&>(*((int*)0)); // expected-error {{'int' is not a class}} // ptr -> incomplete - (void)dynamic_cast<Incomplete*>((A*)0); // expected-error {{'struct Incomplete' is an incomplete type}} + (void)dynamic_cast<Incomplete*>((A*)0); // expected-error {{'Incomplete' is an incomplete type}} // incomplete -> ptr - (void)dynamic_cast<A*>((Incomplete*)0); // expected-error {{'struct Incomplete' is an incomplete type}} + (void)dynamic_cast<A*>((Incomplete*)0); // expected-error {{'Incomplete' is an incomplete type}} } void same() @@ -57,8 +57,8 @@ void up() //(void)dynamic_cast<A&>(*((D*)0)); // Ambiguous - (void)dynamic_cast<A*>((F*)0); // expected-error {{ambiguous conversion from derived class 'struct F' to base class 'struct A':\n struct F -> struct B -> struct A\n struct F -> struct E -> struct A}} - (void)dynamic_cast<A&>(*((F*)0)); // expected-error {{ambiguous conversion from derived class 'struct F' to base class 'struct A':\n struct F -> struct B -> struct A\n struct F -> struct E -> struct A}} + (void)dynamic_cast<A*>((F*)0); // expected-error {{ambiguous conversion from derived class 'F' to base class 'A':\n struct F -> struct B -> struct A\n struct F -> struct E -> struct A}} + (void)dynamic_cast<A&>(*((F*)0)); // expected-error {{ambiguous conversion from derived class 'F' to base class 'A':\n struct F -> struct B -> struct A\n struct F -> struct E -> struct A}} } void poly() @@ -69,6 +69,6 @@ void poly() (void)dynamic_cast<A&>(*((PolyDerived*)0)); // Not polymorphic source - (void)dynamic_cast<Poly*>((A*)0); // expected-error {{'struct A' is not polymorphic}} - (void)dynamic_cast<PolyDerived&>(*((A*)0)); // expected-error {{'struct A' is not polymorphic}} + (void)dynamic_cast<Poly*>((A*)0); // expected-error {{'A' is not polymorphic}} + (void)dynamic_cast<PolyDerived&>(*((A*)0)); // expected-error {{'A' is not polymorphic}} } |