From: Sam McCall Date: Fri, 4 Oct 2019 14:11:05 +0000 (+0000) Subject: Further improve -Wbool-operation bitwise negation message X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35019497fe483b5bf762d7ec5580585b6f50de4b;p=clang Further improve -Wbool-operation bitwise negation message git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373749 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 7aa3cd08cc..1c4ab50f73 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -6638,7 +6638,7 @@ 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 a logicial negation?">, + "bitwise negation of a boolean expression; did you mean logical negation?">, InGroup>; def err_decrement_bool : Error<"cannot decrement expression of type bool">; def warn_increment_bool : Warning< diff --git a/test/Sema/warn-bitwise-negation-bool.c b/test/Sema/warn-bitwise-negation-bool.c index 03d1ea4165..dfec00055c 100644 --- a/test/Sema/warn-bitwise-negation-bool.c +++ b/test/Sema/warn-bitwise-negation-bool.c @@ -12,11 +12,11 @@ typedef _Bool boolean; #endif void test(boolean b, int i) { - b = ~b; // expected-warning {{bitwise negation of a boolean expression; did you mean a logicial negation?}} + b = ~b; // expected-warning {{bitwise negation of a boolean expression; did you mean logical negation?}} // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:7-[[@LINE-1]]:8}:"!" - b = ~(b); // expected-warning {{bitwise negation of a boolean expression; did you mean a logicial negation?}} + b = ~(b); // expected-warning {{bitwise negation of a boolean expression; did you mean logical negation?}} // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:7-[[@LINE-1]]:8}:"!" b = ~i; - i = ~b; // expected-warning {{bitwise negation of a boolean expression; did you mean a logicial negation?}} + i = ~b; // expected-warning {{bitwise negation of a boolean expression; did you mean logical negation?}} // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:7-[[@LINE-1]]:8}:"!" }