aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/resolve-single-template-id.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/resolve-single-template-id.cpp')
-rw-r--r--test/SemaTemplate/resolve-single-template-id.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/SemaTemplate/resolve-single-template-id.cpp b/test/SemaTemplate/resolve-single-template-id.cpp
index 7fb16eb46745..bebca76c4f64 100644
--- a/test/SemaTemplate/resolve-single-template-id.cpp
+++ b/test/SemaTemplate/resolve-single-template-id.cpp
@@ -45,9 +45,15 @@ int main()
+oneT<int>; // expected-warning {{expression result unused}}
-oneT<int>; //expected-error {{invalid argument type}}
oneT<int> == 0; // expected-warning {{equality comparison result unused}} \
- // expected-note {{use '=' to turn this equality comparison into an assignment}}
- 0 == oneT<int>; // expected-warning {{equality comparison result unused}}
- 0 != oneT<int>; // expected-warning {{inequality comparison result unused}}
+ // expected-note {{use '=' to turn this equality comparison into an assignment}} \
+ // expected-warning {{comparison of function 'oneT<int>' equal to a null pointer is always false}} \
+ // expected-note {{prefix with the address-of operator to silence this warning}}
+ 0 == oneT<int>; // expected-warning {{equality comparison result unused}} \
+ // expected-warning {{comparison of function 'oneT<int>' equal to a null pointer is always false}} \
+ // expected-note {{prefix with the address-of operator to silence this warning}}
+ 0 != oneT<int>; // expected-warning {{inequality comparison result unused}} \
+ // expected-warning {{comparison of function 'oneT<int>' not equal to a null pointer is always true}} \
+ // expected-note {{prefix with the address-of operator to silence this warning}}
(false ? one : oneT<int>); // expected-warning {{expression result unused}}
void (*p1)(int); p1 = oneT<int>;
@@ -61,15 +67,17 @@ int main()
b = (void (*)()) twoT<int>;
one < one; //expected-warning {{self-comparison always evaluates to false}} \
- //expected-warning {{expression result unused}}
+ //expected-warning {{relational comparison result unused}}
oneT<int> < oneT<int>; //expected-warning {{self-comparison always evaluates to false}} \
- //expected-warning {{expression result unused}}
+ //expected-warning {{relational comparison result unused}}
two < two; //expected-error 2 {{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}} expected-error {{invalid operands to binary expression ('void' and 'void')}}
twoT<int> < twoT<int>; //expected-error {{reference to overloaded function could not be resolved; did you mean to call it?}} {{cannot resolve overloaded function 'twoT' from context}}
oneT<int> == 0; // expected-warning {{equality comparison result unused}} \
- // expected-note {{use '=' to turn this equality comparison into an assignment}}
+ // expected-note {{use '=' to turn this equality comparison into an assignment}} \
+ // expected-warning {{comparison of function 'oneT<int>' equal to a null pointer is always false}} \
+ // expected-note {{prefix with the address-of operator to silence this warning}}
}