[libcxx-commits] [PATCH] D139114: [Clang][Sema] Enabled implicit conversion warning for CompoundAssignment operator.
Aaron Ballman via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 11 10:55:32 PST 2023
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
Assuming pre-commit CI is happy, this LGTM aside from a few minor things.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:13516-13517
+
/// Analyze the given compound assignment for the possible losing of
/// floating-point precision.
static void AnalyzeCompoundAssignment(Sema &S, BinaryOperator *E) {
----------------
We should probably update this comment as well.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:13535-13536
+ // Check for implicit conversions for compound assignment statements with
+ // intergral operands.
+ if (E->getLHS()->getType()->isIntegerType() &&
+ E->getRHS()->getType()->isIntegerType() && !E->isShiftAssignOp())
----------------
Adding a comment so we don't lose the question.
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