[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 21 09:33:06 PDT 2019


xbolva00 marked an inline comment as done.
xbolva00 added inline comments.


================
Comment at: lib/Sema/SemaExpr.cpp:10983
+
+    S.Diag(Loc, diag::note_xor_used_as_pow_silence) << ("0x2 ^ " + RHSStr);
+  } else if (LeftSideValue == 10) {
----------------
Quuxplusone wrote:
> Do you currently warn on, let's say, `2uLL ^ 7`? and if so, do we care that the suggested expression `0x2 ^ 7` has a different type?  I imagine the answer to "do we care" is "no," but I thought I should ask.
We check if bidwith is same.. Bail out if not.


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

https://reviews.llvm.org/D63423





More information about the cfe-commits mailing list