rjmccall added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6738
+ "assignment to bool">,
+ InGroup;
// Completely identical except off by default.
xbolva00 wrote:
> rjmccall wrote:
> > Sorry, I didn't mean to suggest that you should
xbolva00 marked an inline comment as done.
xbolva00 added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6738
+ "assignment to bool">,
+ InGroup;
// Completely identical except off by default.
rjmccall wrote:
> Sorry, I didn't mean to
rjmccall added inline comments.
Comment at: include/clang/Basic/DiagnosticGroups.td:699
def ParenthesesOnEquality : DiagGroup<"parentheses-equality">;
+def AssigmentInBoolContext : DiagGroup<"assigment-in-bool-context">;
def Parentheses : DiagGroup<"parentheses",
--
xbolva00 added a comment.
Addressed notes.
Not sure why we miss
_Bool warn3(int x, _Bool a) {
return x = 0 || a;
}
in C mode :/
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58878/new/
https://reviews.llvm.org/D58878
___
cfe-commits m
xbolva00 updated this revision to Diff 189711.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58878/new/
https://reviews.llvm.org/D58878
Files:
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExprCXX.cpp
test/CodeCompletion/crash-ski
rjmccall added a comment.
This seems eminently reasonable to warn about. I think people might
legitimately complain about extending an existing warning to a new set of
contexts without putting it under a new warning flag, though. How annoying
would it be to clone the warnings and put them in
xbolva00 created this revision.
xbolva00 added reviewers: RKSimon, aaron.ballman.
Herald added subscribers: cfe-commits, jdoerfert.
Herald added a project: clang.
Follow up for (abandoned) patch https://reviews.llvm.org/D45401
Fixes https://bugs.llvm.org/show_bug.cgi?id=34180
Repository:
rC Cl