[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)
Congcong Cai via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 24 03:33:14 PDT 2024
================
@@ -117,18 +119,18 @@ void UseIntegerSignComparisonCheck::check(
if (BinaryOp == nullptr)
return;
- auto OpCode = BinaryOp->getOpcode();
- const auto *LHS = BinaryOp->getLHS()->IgnoreParenImpCasts();
- const auto *RHS = BinaryOp->getRHS()->IgnoreParenImpCasts();
- if (LHS == nullptr || RHS == nullptr)
+ const BinaryOperator::Opcode OpCode = BinaryOp->getOpcode();
+ const auto *Lhs = BinaryOp->getLHS()->IgnoreParenImpCasts();
----------------
HerrCai0907 wrote:
I am not sure whether is worth to change from LHS to Lhs
LHS is more wide used variable name in LLVM then Lhs. In clang source code, full uppercase abbreviation is also wide used.
https://github.com/llvm/llvm-project/pull/113144
More information about the cfe-commits
mailing list