diff options
Diffstat (limited to 'clang/test/SemaCXX')
-rw-r--r-- | clang/test/SemaCXX/addr-of-overloaded-function.cpp | 3 | ||||
-rw-r--r-- | clang/test/SemaCXX/member-pointer.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/overloaded-name.cpp | 5 | ||||
-rw-r--r-- | clang/test/SemaCXX/overloaded-operator.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/unknown-anytype.cpp | 4 |
5 files changed, 7 insertions, 9 deletions
diff --git a/clang/test/SemaCXX/addr-of-overloaded-function.cpp b/clang/test/SemaCXX/addr-of-overloaded-function.cpp index a36fd582db2..c3360cc0599 100644 --- a/clang/test/SemaCXX/addr-of-overloaded-function.cpp +++ b/clang/test/SemaCXX/addr-of-overloaded-function.cpp @@ -57,8 +57,7 @@ struct B struct C { C &getC() { - // FIXME: this error message is terrible - return makeAC; // expected-error{{cannot bind to a value of unrelated type}} + return makeAC; // expected-error{{reference to non-static member function must be called}} } C &makeAC(); diff --git a/clang/test/SemaCXX/member-pointer.cpp b/clang/test/SemaCXX/member-pointer.cpp index cf6481015a8..4e8b4a813ba 100644 --- a/clang/test/SemaCXX/member-pointer.cpp +++ b/clang/test/SemaCXX/member-pointer.cpp @@ -278,7 +278,7 @@ namespace PR9973 { typedef R T::*F; F f_; template<class U> int & call(U u) - { return u->*f_; } // expected-error{{non-const lvalue reference to type 'int' cannot bind to a temporary of type '<bound member function type>'}} + { return u->*f_; } // expected-error{{reference to non-static member function must be called; did you mean to call it with no arguments?}} expected-error {{non-const lvalue reference to type 'int' cannot bind to a temporary of type 'int'}} template<class U> int operator()(U u) { call(u); } // expected-note{{in instantiation of}} diff --git a/clang/test/SemaCXX/overloaded-name.cpp b/clang/test/SemaCXX/overloaded-name.cpp index a5ec51ced23..6da03544009 100644 --- a/clang/test/SemaCXX/overloaded-name.cpp +++ b/clang/test/SemaCXX/overloaded-name.cpp @@ -21,11 +21,10 @@ namespace rdar9623945 { public: const char* text(void); void g(void) { - // FIXME: why 2x? f(text()); - f(text); // expected-error 2{{reference to non-static member function must be called; did you mean to call it with no arguments?}} + f(text); // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}} f(text()); - f(text); // expected-error 2{{reference to non-static member function must be called; did you mean to call it with no arguments?}} + f(text); // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}} } }; } diff --git a/clang/test/SemaCXX/overloaded-operator.cpp b/clang/test/SemaCXX/overloaded-operator.cpp index 1e4a3b7514b..d9b75f74f6f 100644 --- a/clang/test/SemaCXX/overloaded-operator.cpp +++ b/clang/test/SemaCXX/overloaded-operator.cpp @@ -392,7 +392,7 @@ namespace rdar9136502 { }; struct Y { - Y &operator<<(int); // expected-note{{candidate function not viable: no known conversion from '<bound member function type>' to 'int'}} + Y &operator<<(int); }; void f(X x, Y y) { diff --git a/clang/test/SemaCXX/unknown-anytype.cpp b/clang/test/SemaCXX/unknown-anytype.cpp index ba52122bc49..a07ec83d10a 100644 --- a/clang/test/SemaCXX/unknown-anytype.cpp +++ b/clang/test/SemaCXX/unknown-anytype.cpp @@ -14,9 +14,9 @@ namespace test1 { // making sure that these locations check for placeholder types // properly. - int x = foo; // expected-error {{cannot initialize}} + int x = foo; // expected-error {{'foo' has unknown type}} int y = 0 + foo; // expected-error {{'foo' has unknown type}} - return foo; // expected-error {{cannot initialize}} + return foo; // expected-error {{'foo' has unknown type}} } } |