Further improve -Wbool-operation bitwise negation message

llvm-svn: 373749
This commit is contained in:
Sam McCall 2019-10-04 14:11:05 +00:00
parent 5d862c042b
commit f44ca7f6eb
2 changed files with 4 additions and 4 deletions

View 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<

View 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}:"!"
}