[clang-tools-extra] [clang-tidy][NFC] Enable `modernize-use-auto` in clang-tidy config and fix warnings (PR #157468)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 8 07:13:23 PDT 2025
================
@@ -138,9 +138,9 @@ void UseIntegerSignComparisonCheck::check(
return;
const Expr *SubExprLHS = nullptr;
const Expr *SubExprRHS = nullptr;
- SourceRange R1 = SourceRange(LHS->getBeginLoc());
- SourceRange R2 = SourceRange(BinaryOp->getOperatorLoc());
- SourceRange R3 = SourceRange(Lexer::getLocForEndOfToken(
+ SourceRange R1(LHS->getBeginLoc());
----------------
flovent wrote:
This check correctly suggest `auto R1 = SourceRange(LHS->getBeginLoc());` here, but i think directly calling ctor is better here.
https://github.com/llvm/llvm-project/pull/157468
More information about the cfe-commits
mailing list