Open Quuxplusone opened 6 years ago
Bugzilla Link | PR35136 |
Status | NEW |
Importance | P normal |
Reported by | Roman Lebedev (lebedev.ri@gmail.com) |
Reported on | 2017-10-30 14:24:49 -0700 |
Last modified on | 2018-09-19 06:14:15 -0700 |
Version | unspecified |
Hardware | PC Linux |
CC | alexfh@google.com, djasper@google.com, ioeric@google.com, klimek@google.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
The two diagnostics you're referring to are on different notes:
<stdin>:1:14: warning: use of logical '&&' with constant operand [-Wconstant-
logical-operand]
void a() { 1 && 1; }
^ ~
<stdin>:1:14: note: use '&' for a bitwise operation
void a() { 1 && 1; }
^~
&
<stdin>:1:14: note: remove constant to silence this warning
void a() { 1 && 1; }
~^~~~
<stdin>:1:14: warning: expression result unused [-Wunused-value]
void a() { 1 && 1; }
~ ^ ~
If clang-tidy is assuming that it can apply the fix-its from two distinct notes
(representing two different ways of addressing the issue) to the same source,
that's a clang-tidy bug.