================
@@ -316,3 +316,11 @@ Options
    When `true`, the check will warn on pointer arithmetic where the
    element count is obtained from a division with ``sizeof(...)``,
    e.g., ``Ptr + Bytes / sizeof(*T)``. Default is `true`.
+
+.. option:: WarnOnSizeOfInLoopTermination
+
+   When `true`, the check will warn about incorrect use of sizeof expression
+   in loop termination condition. The warning triggers if the sizeof expression
+   appears to be incorrectly used to determine the number of array/buffer 
elements.
+   e.g, ``long arr[10]; for(int i = 0; i < sizeof(arr); i++) { ... }. Default
----------------
EugeneZelenko wrote:

```suggestion
   e.g, ``long arr[10]; for(int i = 0; i < sizeof(arr); i++) { ... }``. Default
```

https://github.com/llvm/llvm-project/pull/143205
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to