[PATCH] D134457: Document WarnOnSizeOfPointerToAggregate.

Michael Benfield via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 22 10:19:58 PDT 2022


mbenfield created this revision.
mbenfield added a reviewer: mizvekov.
Herald added a project: All.
mbenfield requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

This option was just landed in D134381 <https://reviews.llvm.org/D134381>. It would make sense to actually
document it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134457

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


Index: clang-tools-extra/docs/clang-tidy/checks/bugprone/sizeof-expression.rst
===================================================================
--- clang-tools-extra/docs/clang-tidy/checks/bugprone/sizeof-expression.rst
+++ clang-tools-extra/docs/clang-tidy/checks/bugprone/sizeof-expression.rst
@@ -187,3 +187,9 @@
    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`.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134457.462229.patch
Type: text/x-patch
Size: 698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220922/34b81b99/attachment.bin>


More information about the cfe-commits mailing list