[PATCH] D17134: [clang-tidy] Fix an assert failure of ForStmt in `readability-braces-around-statements` check.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 11 04:16:32 PST 2016


alexfh added inline comments.

================
Comment at: test/clang-tidy/readability-braces-around-statements-assert-failure.cpp:13
@@ +12,3 @@
+  std::vector<int> e;
+  for (typename std::vector<T>::const_reverse_iterator iter = e.begin(),
+                                                       end2 = e.end();
----------------
Can you further reduce the test case so it still causes a crash, but doesn't generate so many compilation errors?

The problem with matching compilation errors in clang-tidy tests is that a change in Clang parser can break clang-tidy tests. The more errors you verify, the higher the chance of this kind of a breakage. If we need to verify clang errors, we should keep their number minimal.


Repository:
  rL LLVM

http://reviews.llvm.org/D17134





More information about the cfe-commits mailing list