[libcxx-commits] [PATCH] D139114: [Clang][Sema] Enabled implicit conversion warning for CompoundAssignment operator.

Alexander Richardson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 6 10:47:44 PST 2023


arichardson added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:13402
+  // intergral operands.
+  if (E->getLHS()->getType()->isIntegerType() &&
+      E->getRHS()->getType()->isIntegerType() && !E->isShiftAssignOp())
----------------
Why is this restricted to integers? It looks like `CheckImplicitConversion` also handles other types? Does calling it unconditionally cause any issues?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139114



More information about the libcxx-commits mailing list