[PATCH] D85097: [Sema] add warning for comparisons like 'x<=y<=z'

Vince Bridgers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 6 02:46:26 PDT 2020


vabridgers added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:14034
+      << FixItHint::CreateInsertion(LHSExpr->getEndLoc(), ") && ")
+      << FixItHint::CreateInsertion(LHSBO->getRHS()->getBeginLoc(), "(y ")
+      << FixItHint::CreateInsertion(RHSExpr->getEndLoc(), ")");
----------------
njames93 wrote:
> You don't want to insert `y` but the source code for `y`
Gotcha, I'll address.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85097



More information about the cfe-commits mailing list