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

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 6 17:38:32 PST 2020


njames93 updated this revision to Diff 236486.
njames93 added a comment.

I have tried to make the code more robust against macro decls. Also target the actual type specifier rather than everything before the name when doing the replacements. This should leave any other qualifiers or attributes in tact. The test cases have been updated to add checks for using and typedefs alias. There are also tests for function pointers and lambdas,  with the current behaviour to add pointer qual for function pointer but not for lambdas(as they aren't function pointers under the hood). Not sure I want to implement support for pointers to pointers as that's not going to help readability(Are you a pointer to an array of arrays, array of pointers, pointer to array or pointer to pointer). As for the alias whats the correct procedure for creating an alias


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

https://reviews.llvm.org/D72217

Files:
  clang-tools-extra/clang-tidy/readability/CMakeLists.txt
  clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp
  clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.h
  clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst
  clang-tools-extra/test/clang-tidy/checkers/readability-qualified-auto.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72217.236486.patch
Type: text/x-patch
Size: 21291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200107/3638625c/attachment-0001.bin>


More information about the cfe-commits mailing list