[clang-tools-extra] 33bc9c3 - Document WarnOnSizeOfPointerToAggregate.
Michael Benfield via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 22 10:39:03 PDT 2022
Author: Michael Benfield
Date: 2022-09-22T17:38:04Z
New Revision: 33bc9c3bf2e09f15ea7be7bc090492fad8226b34
URL: https://github.com/llvm/llvm-project/commit/33bc9c3bf2e09f15ea7be7bc090492fad8226b34
DIFF: https://github.com/llvm/llvm-project/commit/33bc9c3bf2e09f15ea7be7bc090492fad8226b34.diff
LOG: Document WarnOnSizeOfPointerToAggregate.
This option was just landed in D134381. It would make sense to actually
document it.
Differential Revision: https://reviews.llvm.org/D134457
Added:
Modified:
clang-tools-extra/docs/clang-tidy/checks/bugprone/sizeof-expression.rst
Removed:
################################################################################
diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/sizeof-expression.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/sizeof-expression.rst
index 4ba7c3008bd6a..a3e88b837d375 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/sizeof-expression.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/sizeof-expression.rst
@@ -187,3 +187,9 @@ Options
When `true`, the check will warn on an expression like
``sizeof(expr) <= k`` for a suspicious constant `k` while `k` is `0` or
greater than `0x8000`. Default is `true`.
+
+.. option:: WarnOnSizeOfPointerToAggregate
+
+ When `true, the check will warn on an expression like
+ ``sizeof(expr)`` where the expression is a pointer
+ to aggregate. Default is `true`.
More information about the cfe-commits
mailing list