summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Bolvansky <david.bolvansky@gmail.com>2019-10-07 21:57:03 +0000
committerDavid Bolvansky <david.bolvansky@gmail.com>2019-10-07 21:57:03 +0000
commitbfb7afed5cdfdf021937d28826861825feb84969 (patch)
tree1efc3b2d450be097ae1a302ca1adcf3f150d1471 /include
parentafaf7b4576387ad03afacd65a2b3b0726cd631a0 (diff)
downloadclang-bfb7afed5cdfdf021937d28826861825feb84969.tar.gz
[Diagnostics] Emit better -Wbool-operation's warning message if we known that the result is always true
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index c54380639a..23cedcab27 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -6638,7 +6638,8 @@ def note_member_declared_here : Note<
def note_member_first_declared_here : Note<
"member %0 first declared here">;
def warn_bitwise_negation_bool : Warning<
- "bitwise negation of a boolean expression; did you mean logical negation?">,
+ "bitwise negation of a boolean expression%select{;| always evaluates to 'true';}0 "
+ "did you mean logical negation?">,
InGroup<DiagGroup<"bool-operation">>;
def err_decrement_bool : Error<"cannot decrement expression of type bool">;
def warn_increment_bool : Warning<