[PATCH] D66141: [FileCheck] Forbid using var defined on same line
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 03:02:30 PDT 2019
thopre added inline comments.
================
Comment at: llvm/unittests/Support/FileCheckTest.cpp:86-88
- // Variable defined by numeric expression: isValueKnownAtMatchTime
- // returns true, getValue and eval return value of expression, setValue
- // clears expression.
----------------
thopre wrote:
> jhenderson wrote:
> > I'm not sure I follow why this case has been deleted, if it's still valid to define a variable via an expression.
> Indeed, it just needs adapting.
Actually that removal is justified because the FileCheckNumericVariable that this testcase tests is no longer aware of where does the value of a variable comes from. Because this patch forbids using a variable defined on the same CHECK directive, the value is guaranteed to be available in the FileCheckNumericVariable when doing the subtitution. A variable therefore only needs to be set to a given value or its value retrieved (for subtitution).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66141/new/
https://reviews.llvm.org/D66141
More information about the llvm-commits
mailing list