[PATCH] D77227: [RFC][FileCheck] Require colon immediately after CHECK directives

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 12:04:50 PDT 2020


probinson added a comment.

In D77227#1955350 <https://reviews.llvm.org/D77227#1955350>, @jdenny wrote:

> In D77227#1955304 <https://reviews.llvm.org/D77227#1955304>, @jdoerfert wrote:
>
> > The first I looked up `llvm/test/Transforms/LoopUnroll/runtime-loop5.ll:26` is `UNROLL-16-LABEL-NOT:`, which may not be allowed.
>
>
> There are already a number of bad `NOT` combination checks.  I'm not sure why it doesn't include `LABEL`.


I was trying to avoid doing a combinatoric check of all suffixes, but maybe I was being too optimistic.  People are far more creative about their mistakes than I had imagined.  CHECK-SAME-DAG?  Whoa.

> This patch attempts to catch 1 & 2, but it unfortunately still has a lot of false positives, as it triggers on comments in testcases that refer to the CHECKs themselves.

While FileCheck allows a CHECK directive anywhere, in practice people always put them at the start of a line with possibly comment delimiters of some form in front (which are always punctuation marks of some kind, in the languages that FileCheck supports).  Maybe FileCheck should say, that's where directives *have* to be.  Are there real tests where that would be a problem?


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