[PATCH] D30725: [FileCheck] Added [[@CLEAR:regex]] as a way to clear variables.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 16:53:28 PST 2017


arsenm added a comment.

In https://reviews.llvm.org/D30725#695102, @jlebar wrote:

> > It definitely does not now, I think it would be less burdensome than having to list every used variable (which is just another place you can make a typo) to clear it
>
> Yeah, but cleaning that up globally in all our tests sounds like a recipe for disaster.  And I'm sure we'll also find some tests where we really *do* want to keep regexps alive across CHECK-LABELS.
>
> I suppose we could have a filecheck mode that behaves as you describe, but that also sounds worse.
>
> Also, if you don't want to list the used variables, you can match on [[@CLEAR:.*]].


I think those are abuses of CHECK-LABEL then. The use case is to treat a region begun by a label as a separate error reporting region. The common case is for multiple independent testcase functions in a single file. The weird case that is checking matches between functions is a special case that I don't think should be using -LABEL


https://reviews.llvm.org/D30725





More information about the llvm-commits mailing list