[PATCH] D49084: FileCheck: Add support for variable expressions

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 05:00:34 PDT 2018


thopre added a comment.

In https://reviews.llvm.org/D49084#1158838, @thopre wrote:

> In https://reviews.llvm.org/D49084#1156379, @probinson wrote:
>
> > Maybe this should be a new class of "numeric variables" with distinct syntax, e.g., `[[#VAR]]` or something, with an implicit regex of `[[:digit:]]+` instead of making the test-writer use a valid regex.
>
>
> I'm not sure I'm following you. Do you mean using a different syntax when (i) defining numeric variable or (ii) when using numeric expression?
>  I also do not understand how this would prevent the test-writer from having to use a valid regex. Could you give an example of the problem you see?


Oh you mean using #VAR to define a numeric variable, therefore avoiding the need to have a regular expression. Yes, I like the idea, especially since it can work with the idea of a syntax to specify the base in which to interpret things as suggested by @jhenderson. What it needs though is a way to distinguish between definition and use though. I'll think about it.


Repository:
  rL LLVM

https://reviews.llvm.org/D49084





More information about the llvm-commits mailing list