Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-02-03 Thread Richard via cfe-commits
In article , Aaron Ballman writes: > On Wed, Feb 3, 2016 at 3:57 PM, Kim Gräsman wrote: > > On Mon, Feb 1, 2016 at 4:32 PM, Aaron Ballman > wrote: > >> > >> > >> Comment at: clang-tidy/readability/RedundantControlFlowCheck.cpp:60 > >> @@ +59,3 @@ > >> + if (const auto *R

Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-02-03 Thread Aaron Ballman via cfe-commits
On Wed, Feb 3, 2016 at 3:57 PM, Kim Gräsman wrote: > On Mon, Feb 1, 2016 at 4:32 PM, Aaron Ballman wrote: >> >> >> Comment at: clang-tidy/readability/RedundantControlFlowCheck.cpp:60 >> @@ +59,3 @@ >> + if (const auto *Return = dyn_cast(*last)) >> +issueDiagnostic(Result, Bl

Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-02-03 Thread Kim Gräsman via cfe-commits
On Mon, Feb 1, 2016 at 4:32 PM, Aaron Ballman wrote: > > > Comment at: clang-tidy/readability/RedundantControlFlowCheck.cpp:60 > @@ +59,3 @@ > + if (const auto *Return = dyn_cast(*last)) > +issueDiagnostic(Result, Block, Return->getSourceRange(), > +Redund

Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-02-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for adding more test cases! Could you address one more comment in a follow-up, please? Comment at: test/clang-tidy/readability-redundant-control-flow.cpp:193 @@ +192,3 @@ +// CHECK-FIXES-NEXT: {{^return;$}} +// CHECK-FIXES-NEXT: {{^ *}$}} +

Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-02-01 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. With one small nit to the diagnostic wording for consistency, LGTM! I will go ahead and make that change, then commit on your behalf. You may want to talk to Chris Lattner about

Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-02-01 Thread Aaron Ballman via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I have commit in r259362. Thank you! http://reviews.llvm.org/D16259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-01-28 Thread Richard via cfe-commits
LegalizeAdulthood marked 4 inline comments as done. Comment at: clang-tidy/readability/RedundantControlFlowCheck.cpp:59 @@ +58,3 @@ + CompoundStmt::const_reverse_body_iterator last = Block->body_rbegin(); + if (const auto *Return = dyn_cast(*last)) { +issueDiagnostic(Result,

Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-01-28 Thread Richard via cfe-commits
LegalizeAdulthood updated this revision to Diff 46334. LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added a comment. Update from review comments http://reviews.llvm.org/D16259 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.

Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-01-25 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. Just encountered next situation in my work code base: void Function() { ... if (Condition) { } else return; } http://reviews.llvm.org/D16259 ___ cfe-commits mailing list cfe-commits@lists.l

Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-01-25 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/RedundantControlFlowCheck.cpp:24 @@ +23,3 @@ +const char *const RedundantReturnDiag = +"redundant return statement at the end of void function"; +const char *const RedundantContinueDiag =

Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-01-24 Thread Richard via cfe-commits
LegalizeAdulthood updated this revision to Diff 45842. LegalizeAdulthood added a comment. Improve matcher to simplify callback http://reviews.llvm.org/D16259 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/RedundantContr

Re: [PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

2016-01-23 Thread Richard via cfe-commits
LegalizeAdulthood retitled this revision from "Add clang-tidy readability-redundant-return check" to "Add clang-tidy readability-redundant-control-flow check". LegalizeAdulthood updated this revision to Diff 45814. LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added a comm