[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 06:43:16 PST 2024


================
@@ -28,6 +28,8 @@ In a real use case size means a container's size which depends on the user input
 This algorithm works for a small amount of objects, but will lead to freeze for
 a larger user input.
 
+It's recommended to enable the compiler warning -Wtautological-constant-out-of-range-compare as well, since check does not inspect compile-time constant loop boundaries to avoid overlaps with the warning.
----------------
PiotrZSL wrote:

wrap this on 80 column, and put warning name into single \` 

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


More information about the cfe-commits mailing list