[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 8 06:25:48 PST 2020


JonasToth added inline comments.


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/list.rst:402
    `hicpp-vararg <hicpp-vararg.html>`_, `cppcoreguidelines-pro-type-vararg <cppcoreguidelines-pro-type-vararg.html>`_,
+   `llvm-qualified-auto <llvm-qualified-auto.html>`_, `readability-qualified-auto <readability-qualified-auto.html>`_, "Yes"
 
----------------
That line needs to land above where the other LLVM checks are.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-qualified-auto.cpp:1
+// RUN: %check_clang_tidy %s readability-qualified-auto %t -- -- -std=c++17
+
----------------
please split the tests to one that is `c++11` (check_clang_tidy should default to that) and one that has only `c++17` features.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-qualified-auto.cpp:203
+  auto LambdaTest2 = +[] { return 0; };
+  // CHECK-MESSAGES-NOT: :[[@LINE-1]]:3: warning: 'auto LambdaTest2' can be declared as 'auto *LambdaTest2'
+  // CHECK-FIXES-NOT: {{^}}  auto *LambdaTest2 = +[] { return 0; };
----------------
Please add function references as test anyway, even though there is no new behaviour.


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

https://reviews.llvm.org/D72217





More information about the cfe-commits mailing list