[PATCH] D56789: FileCheck: Allow CHECK-{SAME, NEXT, EMPTY} after initial CHECK-DAG

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 30 16:06:39 PST 2019


jdenny added a comment.

In D56789#1377922 <https://reviews.llvm.org/D56789#1377922>, @thopre wrote:

> >> Perhaps we should introduce some sort of only-tested region (e.g. CHECK-ONLY-START and CHECK-ONLY-END with better name) where CHECK-DAG inside would still be able to be reordered but only what is tested by a CHECK-DAG is allowed. It could also allow CHECK directive inside which would behave as CHECK-NEXT. How does that sound?
> > 
> > Or would that CHECK inside behave as a CHECK-SAME?  In general, how would whitespace be handled?  Error or ignored?
>
> Whatever is consistent with the concept of CHECK-DAG-NEXT I guess. Am suddenly wondering whether 2 CHECK-DAG can match on the same line if they don't overlap?


Yep:

  $ cat check 
  CHECK-DAG: abc
  CHECK-DAG: def
  $ echo 'def abc' | ./bin/FileCheck -v -dump-input=always check |& tail -5
  <<<<<<
         1: def abc
  dag:1         ^~~
  dag:2     ^~~
  >>>>>>



> Anyway, this is just an idea, we should have a discussion on llvm-dev to gather requirements from people who used CHECK-DAG when they wanted something else and come up with a good design.

Agreed.  Would you like to lead that discussion?  While I'm happy to comment, I don't have time for much more here at the moment.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56789/new/

https://reviews.llvm.org/D56789





More information about the llvm-commits mailing list