Re: [PATCH] D17244: [clang-tidy] readability-ternary-operator new check

2016-02-24 Thread Kirill Bobyrev via cfe-commits
omtcyf0 marked 3 inline comments as done. omtcyf0 added a comment. Thanks for the review! I'll fix these issues as soon as I manage to get time for that! http://reviews.llvm.org/D17244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

Re: [PATCH] D17244: [clang-tidy] readability-ternary-operator new check

2016-02-23 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/BracesAroundStatementsCheck.cpp:16 @@ -15,2 +15,3 @@ using namespace clang::ast_matchers; +using namespace clang::tidy::lexer_utils; This file only needs one function from this namespace, so it's

Re: [PATCH] D17244: [clang-tidy] readability-ternary-operator new check

2016-02-17 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 48231. omtcyf0 added a comment. Followed some suggestions Richard has kindly given me; fixed the nonsense in SourceRanges' extracting code http://reviews.llvm.org/D17244 Files: clang-tidy/readability/BracesAroundStatementsCheck.cpp clang-tidy/readabili

Re: [PATCH] D17244: [clang-tidy] readability-ternary-operator new check

2016-02-15 Thread Richard via cfe-commits
LegalizeAdulthood added inline comments. Comment at: docs/clang-tidy/checks/readability-ternary-operator.rst:10 @@ +9,3 @@ +And it gets transformed into:: + (condition ? expression0 : expression1); + Why add the parentheses around the entire statement? They seem

[PATCH] D17244: [clang-tidy] readability-ternary-operator new check

2016-02-13 Thread Kirill Bobyrev via cfe-commits
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 curren