[PATCH] D19586: Misleading Indentation check

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 19 07:03:32 PDT 2016


alexfh added a comment.

Please mark all addressed comments "Done".


================
Comment at: test/clang-tidy/readability-misleading-indentation.cpp:15
@@ +14,3 @@
+      foo2(); // comment
+              // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: wrong indentation, 'else' belongs to 'if(cond2)' statement
+              // CHECK-FIXES: {{^}}  // comment1
----------------
Please place // CHECK comments at column 1 or 3. Indenting them like this makes the test less readable.

================
Comment at: test/clang-tidy/readability-misleading-indentation.cpp:16
@@ +15,3 @@
+              // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: wrong indentation, 'else' belongs to 'if(cond2)' statement
+              // CHECK-FIXES: {{^}}  // comment1
+
----------------
Did you run the tests after changes? I don't think the `// comment1` line can actually appear in the fixed code, when it's not there before the fix.


https://reviews.llvm.org/D19586





More information about the cfe-commits mailing list