summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/condition.cpp
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/SemaCXX/condition.cpp
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/SemaCXX/condition.cpp')
-rw-r--r--clang/test/SemaCXX/condition.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/condition.cpp b/clang/test/SemaCXX/condition.cpp
index 7854d51bfd7..099c11cb9ee 100644
--- a/clang/test/SemaCXX/condition.cpp
+++ b/clang/test/SemaCXX/condition.cpp
@@ -49,7 +49,8 @@ void test3() {
if ("help")
(void) 0;
- if (test3) // expected-warning {{address of function 'test3' will always evaluate to 'true'}}
+ if (test3) // expected-warning {{address of function 'test3' will always evaluate to 'true'}} \
+ expected-note {{prefix with the address-of operator to silence this warning}}
(void) 0;
}
OpenPOWER on IntegriCloud