[PATCH] D60392: FileCheck [12/12]: Support use of var defined on same line

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 13 00:54:57 PST 2021


jhenderson added a comment.

In D60392#3184854 <https://reviews.llvm.org/D60392#3184854>, @thopre wrote:

> In D60392#3184688 <https://reviews.llvm.org/D60392#3184688>, @jhenderson wrote:
>
>> Regarding the CHECK-ASSERT suggestion, do we need it? I was under the impression one of the earlier patches added a syntax like `[[#VAR2, VAR1 + 3:]]` or something to that effect, which achieves the same thing, right? Maybe I'm missing something though.
>
> You mean `[[#VAR2:VAR1+3]]`? Why does that prevent the need for something like CHECK-ASSERT? You still can only refer to a variable defined in an earlier line.

Looking back at the example, I guess it doesn't, although you could use CHECK-SAME to achieve the same effect, I think. More generally, I'm not sure how much I like the idea of checks that don't actually match anything, but I could be persuaded, especially if we can leverage the same functionality to support the CHECK-DEFINE concept I proposed previously (but never got as far as finishing off).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60392



More information about the llvm-commits mailing list