[PATCH] D17244: [clang-tidy] readability-ternary-operator new check
Kirill Bobyrev via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 13 12:36:51 PST 2016
omtcyf0 created this revision.
omtcyf0 added reviewers: alexfh, LegalizeAdulthood, Eugene.Zelenko, djasper.
omtcyf0 added a subscriber: cfe-commits.
This patch introduces a proof-of-concept check for clang-tidy aiming to suggest using ternary operator in order to improve readability.
It's currently really straightforward and "clever" heuristics for auto fixing more sophisticated cases would be added later.
http://reviews.llvm.org/D17244
Files:
clang-tidy/readability/BracesAroundStatementsCheck.cpp
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/readability/TernaryOperatorCheck.cpp
clang-tidy/readability/TernaryOperatorCheck.h
clang-tidy/utils/LexerUtils.cpp
clang-tidy/utils/LexerUtils.h
docs/clang-tidy/checks/list.rst
docs/clang-tidy/checks/readability-ternary-operator.rst
test/clang-tidy/readability-ternary-operator.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17244.47918.patch
Type: text/x-patch
Size: 17038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160213/bde2e175/attachment-0001.bin>
More information about the cfe-commits
mailing list