[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 4 22:01:05 PST 2020
Eugene.Zelenko added a comment.
May be check belong to LLVM module?
================
Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:69
+ if (auto Var = Result.Nodes.getNodeAs<VarDecl>("auto_ptr")) {
+
+ if (!Var->getType().getTypePtr()->getPointeeType().isConstQualified()) {
----------------
Unnecessary empty line.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:6
+
+`LLVM Coding Standards <https://llvm.org/docs/CodingStandards.html>`_ advises to
+make it obvious if a auto typed variable is a pointer, constant pointer or
----------------
Please make first statement same as Release Notes.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:13
+.. code-block:: c++
+ for (auto &Data : MutatableContainer) {
+ change(Data);
----------------
Please separate with empty line.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:25
+ }
+
+
----------------
Unnecessary empty line.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:30
+.. code-block:: c++
+ for (auto &Data : MutatableContainer) {
+ change(Data);
----------------
Please separate with empty line.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:43
+
+
+This check helps to enforce this `LLVM Coding Standards recommendation
----------------
Unnecessary empty line.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72217/new/
https://reviews.llvm.org/D72217
More information about the cfe-commits
mailing list