[clang-tools-extra] [clang-tidy] Fix a broken fix-it provided by `modernize-use-integer-sign-comparison` (PR #163488)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 15 14:38:09 PDT 2025
================
@@ -152,6 +152,8 @@ void UseIntegerSignComparisonCheck::check(
if (const auto *RHSCast = llvm::dyn_cast<ExplicitCastExpr>(RHS)) {
SubExprRHS = RHSCast->getSubExpr();
R2.setEnd(SubExprRHS->getBeginLoc().getLocWithOffset(-1));
+ R3.setBegin(Lexer::getLocForEndOfToken(
+ SubExprRHS->getEndLoc(), 0, *Result.SourceManager, getLangOpts()));
----------------
vbvictor wrote:
Wish we had meaningful names for R1, R2, R3. Could be a later NFC patch
https://github.com/llvm/llvm-project/pull/163488
More information about the cfe-commits
mailing list