[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 9 07:16:58 PST 2024


================
@@ -117,6 +117,10 @@ Changes in existing checks
   options `HeaderFileExtensions` and `ImplementationFileExtensions` by the
   global options of the same name.
 
+- Improved :doc:`bugprone-too-small-loop-variable
+  <clang-tidy/checks/bugprone/too-small-loop-variable>` check by correctly 
+  implementing the check for const loop variable initialized with a function declaration.
----------------
PiotrZSL wrote:

change this second 'check' to 'support' to avoid duplicates, and its not const loop variable but an const loop boundary, and you can remove that "initialized with a function declaration", because this will work also for global variables.

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


More information about the cfe-commits mailing list