Re: [PATCH] D24500: [clang-tidy] Bugfix for readability-redundant-control-flow check

2016-09-16 Thread Kirill Bobyrev via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL281713: [clang-tidy] Bugfix for 
readability-redundant-control-flow check (authored by omtcyfz).

Changed prior to commit:
  https://reviews.llvm.org/D24500?vs=71140&id=71608#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24500

Files:
  clang-tools-extra/trunk/clang-tidy/readability/RedundantControlFlowCheck.cpp
  clang-tools-extra/trunk/test/clang-tidy/readability-redundant-control-flow.cpp

Index: 
clang-tools-extra/trunk/clang-tidy/readability/RedundantControlFlowCheck.cpp
===
--- clang-tools-extra/trunk/clang-tidy/readability/RedundantControlFlowCheck.cpp
+++ clang-tools-extra/trunk/clang-tidy/readability/RedundantControlFlowCheck.cpp
@@ -83,7 +83,7 @@
 dyn_cast(*Previous)->getLocEnd(), tok::semi, SM,
 Result.Context->getLangOpts(),
 /*SkipTrailingWhitespaceAndNewLine=*/true);
-  else
+  if (!Start.isValid())
 Start = StmtRange.getBegin();
   auto RemovedRange = CharSourceRange::getCharRange(
   Start,
Index: 
clang-tools-extra/trunk/test/clang-tidy/readability-redundant-control-flow.cpp
===
--- 
clang-tools-extra/trunk/test/clang-tidy/readability-redundant-control-flow.cpp
+++ 
clang-tools-extra/trunk/test/clang-tidy/readability-redundant-control-flow.cpp
@@ -179,6 +179,7 @@
 // CHECK-FIXES: {{^}}  if (check < T(0)) {{{$}}
 // CHECK-FIXES-NEXT: {{^return;$}}
 // CHECK-FIXES-NEXT: {{^ *}$}}
+// CHECK-FIXES-NEXT: {{^ *}$}}
 
 template <>
 void template_return(int check) {
@@ -191,6 +192,7 @@
 // CHECK-FIXES: {{^}}  if (check < 0) {{{$}}
 // CHECK-FIXES-NEXT: {{^return;$}}
 // CHECK-FIXES-NEXT: {{^ *}$}}
+// CHECK-FIXES-NEXT: {{^ *}$}}
 
 template 
 void template_loop(T end) {


Index: clang-tools-extra/trunk/clang-tidy/readability/RedundantControlFlowCheck.cpp
===
--- clang-tools-extra/trunk/clang-tidy/readability/RedundantControlFlowCheck.cpp
+++ clang-tools-extra/trunk/clang-tidy/readability/RedundantControlFlowCheck.cpp
@@ -83,7 +83,7 @@
 dyn_cast(*Previous)->getLocEnd(), tok::semi, SM,
 Result.Context->getLangOpts(),
 /*SkipTrailingWhitespaceAndNewLine=*/true);
-  else
+  if (!Start.isValid())
 Start = StmtRange.getBegin();
   auto RemovedRange = CharSourceRange::getCharRange(
   Start,
Index: clang-tools-extra/trunk/test/clang-tidy/readability-redundant-control-flow.cpp
===
--- clang-tools-extra/trunk/test/clang-tidy/readability-redundant-control-flow.cpp
+++ clang-tools-extra/trunk/test/clang-tidy/readability-redundant-control-flow.cpp
@@ -179,6 +179,7 @@
 // CHECK-FIXES: {{^}}  if (check < T(0)) {{{$}}
 // CHECK-FIXES-NEXT: {{^return;$}}
 // CHECK-FIXES-NEXT: {{^ *}$}}
+// CHECK-FIXES-NEXT: {{^ *}$}}
 
 template <>
 void template_return(int check) {
@@ -191,6 +192,7 @@
 // CHECK-FIXES: {{^}}  if (check < 0) {{{$}}
 // CHECK-FIXES-NEXT: {{^return;$}}
 // CHECK-FIXES-NEXT: {{^ *}$}}
+// CHECK-FIXES-NEXT: {{^ *}$}}
 
 template 
 void template_loop(T end) {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D24500: [clang-tidy] Bugfix for readability-redundant-control-flow check

2016-09-16 Thread Kirill Bobyrev via cfe-commits
omtcyfz added a subscriber: omtcyfz.
omtcyfz added a comment.

In https://reviews.llvm.org/D24500#542284, @malcolm.parsons wrote:

> I didn't report a bug for this issue, and there isn't an existing one.
>
> I don't have commit access, so please commit it for me.


Since Alex is away at the moment I landed it.


Repository:
  rL LLVM

https://reviews.llvm.org/D24500



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D24500: [clang-tidy] Bugfix for readability-redundant-control-flow check

2016-09-14 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment.

I didn't report a bug for this issue, and there isn't an existing one.


https://reviews.llvm.org/D24500



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D24500: [clang-tidy] Bugfix for readability-redundant-control-flow check

2016-09-14 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.

LG. If there's a related buganizer item, please mention it in the commit 
message.


https://reviews.llvm.org/D24500



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits