[PATCH] D53025: [clang-tidy] implement new check for const return types.
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 9 10:04:10 PDT 2018
ymandel created this revision.
ymandel added reviewers: aaron.ballman, JonasToth, ioeric.
Herald added subscribers: cfe-commits, xazax.hun, mgorny.
Adds a new check readability-const-value-return, which checks for functions with
a ``const``-qualified return type and recommends removal of the `const` keyword.
Such use of ``const`` is superfluous, and prevents valuable compiler
optimizations.
Based in part on the (abandoned) review https://reviews.llvm.org/D33531.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53025
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ConstValueReturnCheck.cpp
clang-tidy/readability/ConstValueReturnCheck.h
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/utils/LexerUtils.cpp
clang-tidy/utils/LexerUtils.h
docs/ReleaseNotes.rst
docs/clang-tidy/checks/list.rst
docs/clang-tidy/checks/readability-const-value-return.rst
test/clang-tidy/Inputs/readability-const-value-return/
test/clang-tidy/Inputs/readability-const-value-return/macro-def.h
test/clang-tidy/readability-const-value-return.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53025.168819.patch
Type: text/x-patch
Size: 15014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181009/597344e2/attachment-0001.bin>
More information about the cfe-commits
mailing list