summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2011-12-09 21:42:37 +0000
committerDavid Blaikie <dblaikie@gmail.com>2011-12-09 21:42:37 +0000
commit10eb4b67d8c7503a3df9a19efad1df4e37437f1b (patch)
tree8afd91de13729e141f836d1f42b81b1831c78020 /clang/test/SemaTemplate
parent66af99eb3487f046e4073d368f2e2077ef380935 (diff)
downloadbcm5719-llvm-10eb4b67d8c7503a3df9a19efad1df4e37437f1b.tar.gz
bcm5719-llvm-10eb4b67d8c7503a3df9a19efad1df4e37437f1b.zip
Add notes for suppressing and (if it's a zero-arg function returning bool) fixing the function-to-bool conversion warning.
llvm-svn: 146280
Diffstat (limited to 'clang/test/SemaTemplate')
-rw-r--r--clang/test/SemaTemplate/resolve-single-template-id.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaTemplate/resolve-single-template-id.cpp b/clang/test/SemaTemplate/resolve-single-template-id.cpp
index 1beb65a0f51..0c9bacca3ed 100644
--- a/clang/test/SemaTemplate/resolve-single-template-id.cpp
+++ b/clang/test/SemaTemplate/resolve-single-template-id.cpp
@@ -41,7 +41,7 @@ int main()
*oneT<int>; // expected-warning {{expression result unused}}
*two; //expected-error {{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}} expected-error {{indirection requires pointer operand}}
*twoT<int>; //expected-error {{reference to overloaded function could not be resolved; did you mean to call it?}}
- !oneT<int>; // expected-warning {{expression result unused}} expected-warning {{address of function 'oneT<int>' will always evaluate to 'true'}}
+ !oneT<int>; // expected-warning {{expression result unused}} expected-warning {{address of function 'oneT<int>' will always evaluate to 'true'}} expected-note {{prefix with the address-of operator to silence this warning}}
+oneT<int>; // expected-warning {{expression result unused}}
-oneT<int>; //expected-error {{invalid argument type}}
oneT<int> == 0; // expected-warning {{equality comparison result unused}} \
@@ -53,7 +53,7 @@ int main()
int i = (int) (false ? (void (*)(int))twoT<int> : oneT<int>); //expected-error {{incompatible operand}}
(twoT<int>) == oneT<int>; //expected-error {{reference to overloaded function could not be resolved; did you mean to call it?}} {{cannot resolve overloaded function 'twoT' from context}}
- bool b = oneT<int>; // expected-warning {{address of function 'oneT<int>' will always evaluate to 'true'}}
+ bool b = oneT<int>; // expected-warning {{address of function 'oneT<int>' will always evaluate to 'true'}} expected-note {{prefix with the address-of operator to silence this warning}}
void (*p)() = oneT<int>;
test<oneT<int> > ti;
void (*u)(int) = oneT<int>;
OpenPOWER on IntegriCloud