Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/member-expr.cpp')
-rw-r--r--clang/test/SemaCXX/member-expr.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/test/SemaCXX/member-expr.cpp b/clang/test/SemaCXX/member-expr.cpp
index 3571fa748b81..3497ef596480 100644
--- a/clang/test/SemaCXX/member-expr.cpp
+++ b/clang/test/SemaCXX/member-expr.cpp
@@ -85,11 +85,11 @@ namespace test5 {
}
void test1(A *x) {
- x.A::foo<int>(); // expected-error {{'test5::A *' is a pointer}}
+ x.A::foo<int>(); // expected-error {{'A *' is a pointer}}
}
void test2(A &x) {
- x->A::foo<int>(); // expected-error {{'test5::A' is not a pointer; did you mean to use '.'?}}
+ x->A::foo<int>(); // expected-error {{'A' is not a pointer; did you mean to use '.'?}}
}
}
@@ -116,9 +116,9 @@ namespace rdar8231724 {
template<typename T> struct Z { int n; };
void f(Y *y) {
- y->N::X1<int>; // expected-error{{'rdar8231724::N::X1' is not a member of class 'rdar8231724::Y'}}
- y->Z<int>::n; // expected-error{{'rdar8231724::Z<int>::n' is not a member of class 'rdar8231724::Y'}}
- y->template Z<int>::n; // expected-error{{'rdar8231724::Z<int>::n' is not a member of class 'rdar8231724::Y'}}
+ y->N::X1<int>; // expected-error{{'rdar8231724::N::X1' is not a member of class 'Y'}}
+ y->Z<int>::n; // expected-error{{'rdar8231724::Z<int>::n' is not a member of class 'Y'}}
+ y->template Z<int>::n; // expected-error{{'rdar8231724::Z<int>::n' is not a member of class 'Y'}}
#if __cplusplus <= 199711L // C++03 or earlier modes
// expected-warning@-2{{'template' keyword outside of a template}}
#endif
@@ -185,7 +185,7 @@ namespace PR15045 {
int f() {
Cl0 c;
- return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; did you mean to use '.'?}}
+ return c->a; // expected-error {{member reference type 'Cl0' is not a pointer; did you mean to use '.'?}}
}
struct bar {
@@ -197,7 +197,7 @@ namespace PR15045 {
};
template <class T> void call_func(T t) {
- t->func(); // expected-error-re 2 {{member reference type 'PR15045::bar' is not a pointer{{$}}}} \
+ t->func(); // expected-error-re 2 {{member reference type '{{(PR15045::)?}}bar' is not a pointer{{$}}}} \
// expected-note {{did you mean to use '.' instead?}}
}
@@ -206,12 +206,12 @@ namespace PR15045 {
foo f;
// Show that recovery has happened by also triggering typo correction
- e->Func(); // expected-error {{member reference type 'PR15045::bar' is not a pointer; did you mean to use '.'?}} \
+ e->Func(); // expected-error {{member reference type 'bar' is not a pointer; did you mean to use '.'?}} \
// expected-error {{no member named 'Func' in 'PR15045::bar'; did you mean 'func'?}}
// Make sure a fixit isn't given in the case that the '->' isn't actually
// the problem (the problem is with the return value of an operator->).
- f->func(); // expected-error-re {{member reference type 'PR15045::bar' is not a pointer{{$}}}}
+ f->func(); // expected-error-re {{member reference type 'bar' is not a pointer{{$}}}}
call_func(e); // expected-note {{in instantiation of function template specialization 'PR15045::call_func<PR15045::bar>' requested here}}
@@ -225,6 +225,6 @@ namespace pr16676 {
int f(S* s) {
T t;
return t.get_s // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
- .i; // expected-error {{member reference type 'pr16676::S *' is a pointer; did you mean to use '->'}}
+ .i; // expected-error {{member reference type 'S *' is a pointer; did you mean to use '->'}}
}
}