[clang-tools-extra] r310585 - [clang-tidy] Enable test for http://llvm.org/PR26228
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 10 05:24:52 PDT 2017
Author: alexfh
Date: Thu Aug 10 05:24:52 2017
New Revision: 310585
URL: http://llvm.org/viewvc/llvm-project?rev=310585&view=rev
Log:
[clang-tidy] Enable test for http://llvm.org/PR26228
Modified:
clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements.cpp
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements.cpp?rev=310585&r1=310584&r2=310585&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements.cpp Thu Aug 10 05:24:52 2017
@@ -176,12 +176,13 @@ void f(const char *p) {
if (!p)
f("\
");
- // CHECK-MESSAGES: :[[@LINE-3]]:10: warning: statement should be inside braces
- // CHECK-FIXES: {{^ }}if (!p) {{{$}}
- // CHECK-FIXES-NEXT: {{^ }}f("\{{$}}
- // CHECK-FIXES-_NEXT: {{^}}");{{$}} FIXME: This breaks (http://llvm.org/PR26228)
- // CHECK-FIXES-_NEXT: {{^}}}{{$}}
-}
+} // end of f
+// CHECK-MESSAGES: :[[@LINE-4]]:10: warning: statement should be inside braces
+// CHECK-FIXES: {{^}} if (!p) {{{$}}
+// CHECK-FIXES-NEXT: {{^}} f("\{{$}}
+// CHECK-FIXES-NEXT: {{^}}");{{$}}
+// CHECK-FIXES-NEXT: {{^}}}{{$}}
+// CHECK-FIXES-NEXT: {{^}}} // end of f{{$}}
#define M(x) x
More information about the cfe-commits
mailing list