Document WarnOnSizeOfPointerToAggregate.
authorMichael Benfield <mbenfield@google.com>
Thu, 22 Sep 2022 17:17:34 +0000 (17:17 +0000)
committerMichael Benfield <mbenfield@google.com>
Thu, 22 Sep 2022 17:38:04 +0000 (17:38 +0000)
This option was just landed in D134381. It would make sense to actually
document it.

Differential Revision: https://reviews.llvm.org/D134457

clang-tools-extra/docs/clang-tidy/checks/bugprone/sizeof-expression.rst

index 4ba7c30..a3e88b8 100644 (file)
@@ -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`.