summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/member-pointer.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-03-10 11:27:22 +0000
committerJohn McCall <rjmccall@apple.com>2010-03-10 11:27:22 +0000
commit85f90559550563863522a58a87fdc4e46e95794b (patch)
tree60f75b5419f63aa12806b5720863118e80ee658e /clang/test/SemaCXX/member-pointer.cpp
parente35eabdd69d397db32c0b5b29a96fbcacdd6ea18 (diff)
downloadbcm5719-llvm-85f90559550563863522a58a87fdc4e46e95794b.tar.gz
bcm5719-llvm-85f90559550563863522a58a87fdc4e46e95794b.zip
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. llvm-svn: 98149
Diffstat (limited to 'clang/test/SemaCXX/member-pointer.cpp')
-rw-r--r--clang/test/SemaCXX/member-pointer.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/test/SemaCXX/member-pointer.cpp b/clang/test/SemaCXX/member-pointer.cpp
index d6050cd7337..92ae92d710c 100644
--- a/clang/test/SemaCXX/member-pointer.cpp
+++ b/clang/test/SemaCXX/member-pointer.cpp
@@ -34,11 +34,11 @@ void f() {
pdid = pdi2;
// Fail conversion due to ambiguity and virtuality.
- int F::*pdif = pdi1; // expected-error {{ambiguous conversion from pointer to member of base class 'struct A' to pointer to member of derived class 'struct F'}}
- int G::*pdig = pdi1; // expected-error {{conversion from pointer to member of class 'struct A' to pointer to member of class 'struct G' via virtual base 'struct D' is not allowed}}
+ int F::*pdif = pdi1; // expected-error {{ambiguous conversion from pointer to member of base class 'A' to pointer to member of derived class 'F':}}
+ int G::*pdig = pdi1; // expected-error {{conversion from pointer to member of class 'A' to pointer to member of class 'G' via virtual base 'D' is not allowed}}
// Conversion to member of base.
- pdi1 = pdid; // expected-error {{incompatible type assigning 'int struct D::*', expected 'int struct A::*'}}
+ pdi1 = pdid; // expected-error {{incompatible type assigning 'int D::*', expected 'int A::*'}}
// Comparisons
int (A::*pf2)(int, int);
@@ -104,8 +104,8 @@ void h() {
(hm.*pf)();
(phm->*pf)();
- (void)(hm->*pi); // expected-error {{left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'struct HasMembers'}}
- (void)(phm.*pi); // expected-error {{left hand operand to .* must be a class compatible with the right hand operand, but is 'struct HasMembers *'}}
+ (void)(hm->*pi); // expected-error {{left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'HasMembers'}}
+ (void)(phm.*pi); // expected-error {{left hand operand to .* must be a class compatible with the right hand operand, but is 'HasMembers *'}}
(void)(i.*pi); // expected-error {{left hand operand to .* must be a class compatible with the right hand operand, but is 'int'}}
int *ptr;
(void)(ptr->*pi); // expected-error {{left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'int *'}}
@@ -115,8 +115,8 @@ void h() {
(void)(d.*pai);
(void)(pd->*pai);
F f, *ptrf = &f;
- (void)(f.*pai); // expected-error {{left hand operand to .* must be a class compatible with the right hand operand, but is 'struct F'}}
- (void)(ptrf->*pai); // expected-error {{left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'struct F *'}}
+ (void)(f.*pai); // expected-error {{left hand operand to .* must be a class compatible with the right hand operand, but is 'F'}}
+ (void)(ptrf->*pai); // expected-error {{left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'F *'}}
(void)(hm.*i); // expected-error {{pointer-to-member}}
(void)(phm->*i); // expected-error {{pointer-to-member}}
OpenPOWER on IntegriCloud