aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/over/over.over/p2-resolve-single-template-id.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/over/over.over/p2-resolve-single-template-id.cpp')
-rw-r--r--test/CXX/over/over.over/p2-resolve-single-template-id.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/CXX/over/over.over/p2-resolve-single-template-id.cpp b/test/CXX/over/over.over/p2-resolve-single-template-id.cpp
index 544a66d9e39a..d2a23ce96df2 100644
--- a/test/CXX/over/over.over/p2-resolve-single-template-id.cpp
+++ b/test/CXX/over/over.over/p2-resolve-single-template-id.cpp
@@ -27,26 +27,26 @@ namespace DontAllowUnresolvedOverloadedExpressionInAnUnusedExpression
void one() { }
template<class T> void oneT() { }
- void two() { } //expected-note 2{{candidate}}
- void two(int) { } //expected-note 2{{candidate}}
- template<class T> void twoT() { } //expected-note 2{{candidate}}
- template<class T> void twoT(T) { } //expected-note 2{{candidate}}
+ void two() { } // expected-note 2 {{possible target for call}}
+ void two(int) { } // expected-note 2 {{possible target for call}}
+ template<class T> void twoT() { } // expected-note 2 {{possible target for call}}
+ template<class T> void twoT(T) { } // expected-note 2 {{possible target for call}}
void check()
{
one; // expected-warning {{expression result unused}}
- two; // expected-error{{cannot resolve overloaded function 'two' from context}}
+ two; // expected-error{{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}}
oneT<int>; // expected-warning {{expression result unused}}
- twoT<int>; // expected-error {{cannot resolve overloaded function 'twoT' from context}}
+ twoT<int>; // expected-error {{reference to overloaded function could not be resolved; did you mean to call it?}}
}
// check the template function case
template<class T> void check()
{
one; // expected-warning {{expression result unused}}
- two; // expected-error{{cannot resolve overloaded function 'two' from context}}
+ two; // expected-error{{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}}
oneT<int>; // expected-warning {{expression result unused}}
- twoT<int>; // expected-error {{cannot resolve overloaded function 'twoT' from context}}
+ twoT<int>; // expected-error {{reference to overloaded function could not be resolved; did you mean to call it?}}
}
@@ -128,8 +128,8 @@ namespace member_pointers {
template <typename T> bool f(T) { return false; }
template <typename T> static bool g(T) { return false; }
- template <typename T> bool h(T) { return false; }
- template <int N> static bool h(int) { return false; }
+ template <typename T> bool h(T) { return false; } // expected-note 3 {{possible target for call}}
+ template <int N> static bool h(int) { return false; } // expected-note 3 {{possible target for call}}
};
void test(S s) {
@@ -137,8 +137,8 @@ namespace member_pointers {
if (S::f<int>) return; // expected-error {{call to non-static member function without an object argument}}
if (&S::f<char>) return;
if (&S::f<int>) return;
- if (s.f<char>) return; // expected-error {{a bound member function may only be called}}
- if (s.f<int>) return; // expected-error {{a bound member function may only be called}}
+ if (s.f<char>) return; // expected-error {{reference to non-static member function must be called}}
+ if (s.f<int>) return; // expected-error {{reference to non-static member function must be called}}
if (&s.f<char>) return; // expected-error {{cannot create a non-constant pointer to member function}}
if (&s.f<int>) return; // expected-error {{cannot create a non-constant pointer to member function}}
@@ -152,13 +152,13 @@ namespace member_pointers {
if (&s.g<int>) return;
if (S::h<42>) return;
- if (S::h<int>) return; // expected-error {{a bound member function may only be called}}
+ if (S::h<int>) return; // expected-error {{reference to overloaded function could not be resolved; did you mean to call it?}}
if (&S::h<42>) return;
if (&S::h<int>) return;
if (s.h<42>) return;
- if (s.h<int>) return; // expected-error {{a bound member function may only be called}}
+ if (s.h<int>) return; // expected-error {{reference to overloaded function could not be resolved; did you mean to call it?}}
if (&s.h<42>) return;
- if (&s.h<int>) return; // expected-error {{a bound member function may only be called}}
+ if (&s.h<int>) return; // expected-error {{reference to overloaded function could not be resolved; did you mean to call it?}}
{ bool b = S::f<char>; } // expected-error {{call to non-static member function without an object argument}}
{ bool b = S::f<int>; } // expected-error {{call to non-static member function without an object argument}}