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

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 11 08:57:33 PST 2016


hokein 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();
----------------
alexfh wrote:
> 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.
Indeed, this is the minimal test case.

Is there a way to modify the test script to ignore message of compilation errors?


Repository:
  rL LLVM

http://reviews.llvm.org/D17134





More information about the cfe-commits mailing list