[PATCH] D108893: clang-tidy: introduce readability-containter-data-pointer check

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 30 08:44:31 PDT 2021


compnerd marked 2 inline comments as done.
compnerd added inline comments.


================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:87
+
+  Finds cases where code could use ``data`` rather than the address of an element.
+
----------------
Eugene.Zelenko wrote:
> It'll be good idea to mention containers and that `data` is method.
That was dumb, you're right.  Thanks!


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-data-pointer.rst:6
+
+Finds instances of the data pointer being materialized by taking the address of
+the element at index 0 of a container. In particular, ``std::vector`` and
----------------
Eugene.Zelenko wrote:
> Please make first statement same as in Release Notes.
That was a good idea.  I find that the updated text reads much better too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108893/new/

https://reviews.llvm.org/D108893



More information about the cfe-commits mailing list