Added readability-qualified-auto check
authorNathan James <n.james93@hotmail.co.uk>
Tue, 14 Jan 2020 19:05:45 +0000 (14:05 -0500)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 14 Jan 2020 19:06:46 +0000 (14:06 -0500)
commit36fcbb838c8f293f46bfed78c6ed8c177f1e3485
tree70a4e2a217459d962881306c52cf210fa875ce33
parentcd800f3b226b25142f233beca846715fc601809b
Added readability-qualified-auto check

Adds a check that detects any auto variables that are deduced to a pointer or
a const pointer then adds in the const and asterisk according. Will also
check auto L value references that could be written as const. This relates
to the coding standard
https://llvm.org/docs/CodingStandards.html#beware-unnecessary-copies-with-auto
clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp
clang-tools-extra/clang-tidy/readability/CMakeLists.txt
clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.h [new file with mode: 0644]
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/llvm-qualified-auto.rst [new file with mode: 0644]
clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/readability-qualified-auto-cxx20.cpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/readability-qualified-auto.cpp [new file with mode: 0644]