[PATCH] D77227: [RFC][FileCheck] Require colon immediately after CHECK directives
Joel E. Denny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 14:39:12 PDT 2020
jdenny added a comment.
The results so far are promising, but it's not clear to me yet that this should be on by default.
I think the next step is to try more test suites. It has to be done eventually. Clang would be a good one.
================
Comment at: llvm/lib/Support/FileCheck.cpp:1131-1145
+ {Check::CheckNext, "NEXT"},
+ {Check::CheckSame, "SAME"},
+ {Check::CheckNot, "NOT"},
+ {Check::CheckDAG, "DAG"},
+ {Check::CheckLabel, "LABEL"},
+ {Check::CheckEmpty, "EMPTY"},
+ {Check::CheckBadNot, "DAG-NOT"},
----------------
I believe you need to change the order here. For example, CHECK-NEXT-NOT will match CHECK-NEXT and then be ignored. Likewise for CHECK-NOT-NEXT and CHECK-NOT.
If FileCheck's test suite doesn't already cover cases like that, now would be a good time to extend it. It might not be a bad idea to move all that into a parent patch as the refactoring and tests seems worthwhile independently of the new diagnostic.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77227/new/
https://reviews.llvm.org/D77227
More information about the llvm-commits
mailing list