[all-commits] [llvm/llvm-project] e65d32: [clang-tidy] Improve integer comparison by matchin...

David Rivera via All-commits all-commits at lists.llvm.org
Tue Jun 10 00:57:33 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e65d32316646e6203a3f4d4c9921edcddbb1c57d
      https://github.com/llvm/llvm-project/commit/e65d32316646e6203a3f4d4c9921edcddbb1c57d
  Author: David Rivera <davidriverg at gmail.com>
  Date:   2025-06-10 (Tue, 10 Jun 2025)

  Changed paths:
    M clang-tools-extra/clang-tidy/modernize/UseIntegerSignComparisonCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/modernize/use-integer-sign-comparison.cpp

  Log Message:
  -----------
  [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (#134188)

Aims to fix #127471
Covered the edge case where an int expression is not necessarily
directly wrapped around an 'ImplicitCastExpr' which seemed to be a
requirement in 'use-integer-sign-comparison.cpp' check to trigger.

**For instance**:

```cpp
#include <vector>

bool f() {
  std::vector<int> v;
  unsigned int i = 0;

  return i >= v.size();
}
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list