]> granicus.if.org Git - clang/commitdiff
Further improve -Wbool-operation bitwise negation message
authorSam McCall <sam.mccall@gmail.com>
Fri, 4 Oct 2019 14:11:05 +0000 (14:11 +0000)
committerSam McCall <sam.mccall@gmail.com>
Fri, 4 Oct 2019 14:11:05 +0000 (14:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373749 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
test/Sema/warn-bitwise-negation-bool.c

index 7aa3cd08cc04657af537be8fde94f0ab42456361..1c4ab50f73fec1cac5c1b4ac67fb666909eadb12 100644 (file)
@@ -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<DiagGroup<"bool-operation">>;
 def err_decrement_bool : Error<"cannot decrement expression of type bool">;
 def warn_increment_bool : Warning<
index 03d1ea4165f3f3274e9915f7695751d1dd779e14..dfec00055cd53b7451e494718628e45bbb51440e 100644 (file)
@@ -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}:"!"
 }