[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
Tue Jun 17 17:13:40 PDT 2025
================
@@ -219,6 +219,11 @@ 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
----------------
EugeneZelenko wrote:
```suggestion
<clang-tidy/checks/bugprone/bugprone-sizeof-expression>` check by adding
`WarnOnSizeOfInLoopTermination` option to detect misuses of ``sizeof``
```
https://github.com/llvm/llvm-project/pull/143205
More information about the cfe-commits
mailing list