[clang] [clang-tools-extra] [clang-tidy] Warn about misuse of sizeof operator in loops. (PR #143205)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 12 14:26:39 PDT 2025


================
@@ -219,6 +219,12 @@ Changes in existing checks
   tolerating fix-it breaking compilation when functions is used as pointers
   to avoid matching usage of functions within the current compilation unit.
 
+- Improved :doc: `bugprone-sizeof-expression
+ <clang-tidy/checks/bugprone/bugprone-sizeof-expression>` check.
+
+ Introduced WarnOnSizeOfInLoopTermination sub-class to detect misuses of sizeof expression
----------------
EugeneZelenko wrote:

```suggestion
 Introduced `WarnOnSizeOfInLoopTermination` option to detect misuses of ``sizeof`` expression
```

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


More information about the cfe-commits mailing list