[clang-tools-extra] [clang-tidy] Handle inclusive array bounds in modernize-loop-convert (PR #242929)

Richard Thomson via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 16 17:52:51 PST 2026


================
@@ -305,6 +305,12 @@ infrastructure are described first, followed by tool-specific sections.
   nested expressions involving different macros or a mix of macro and
   non-macro operands.
 
+- Improved {doc}`modernize-loop-convert
+  <clang-tidy/checks/modernize/loop-convert>` to recognize inclusive bounds
+  such as `i <= N - 1` and `N - 1 >= i` when iterating over an array of
+  `N` elements.
+  Fixes [#22568](https://github.com/llvm/llvm-project/issues/22568).
----------------
LegalizeAdulthood wrote:

fixed

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


More information about the cfe-commits mailing list