[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr for use-integer-sign-comparison (PR #144240)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 12 14:22:21 PDT 2025


================
@@ -91,7 +93,8 @@ void UseIntegerSignComparisonCheck::storeOptions(
 
 void UseIntegerSignComparisonCheck::registerMatchers(MatchFinder *Finder) {
   const auto SignedIntCastExpr = intCastExpression(true, "sIntCastExpression");
-  const auto UnSignedIntCastExpr = intCastExpression(false);
+  const auto UnSignedIntCastExpr =
+      intCastExpression(false, "uIntCastExpression");
----------------
vbvictor wrote:

We could remove default-parameter in `intCastExpression` because now we always use bind-name.

https://github.com/llvm/llvm-project/pull/144240


More information about the cfe-commits mailing list