nickdesaulniers added inline comments.

================
Comment at: clang/test/SemaCXX/expressions.cpp:146-148
   #define Y2 2
   bool r2 = X || Y2; // expected-warning {{use of logical '||' with constant 
operand}} \
                      // expected-note {{use '|' for a bitwise operation}}
----------------
nickdesaulniers wrote:
> So I think we'll want to change this test.
> 
> See commit d6eb2b9f4d4fc236376e3a5a7b8faa31e8dd427d that introduced it.
> 
> If we have a constant that was defined via macro, we DONT want to warn for it.
Another related issue is that sometimes we set these constants via `-D` flags. 
I wonder if that's a clang bug that those aren't considered as having a valid 
macro id?

See also https://github.com/ClangBuiltLinux/linux/issues/1806


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142609/new/

https://reviews.llvm.org/D142609

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to