[PATCH] D60385: FileCheck [5/12]: Introduce regular numeric variables
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 03:28:14 PDT 2019
jhenderson added inline comments.
================
Comment at: llvm/unittests/Support/FileCheckTest.cpp:239
+ FileCheckNumericVariable LineVar = FileCheckNumericVariable("@LINE", 42);
+ FileCheckNumericVariable NVar = FileCheckNumericVariable("@LINE", 10);
+ FileCheckNumExpr NumExprLine = FileCheckNumExpr(doAdd, &LineVar, 0);
----------------
Shouldn't this use something other than "@LINE"? How does this even work given its used in a substitution "N"?
================
Comment at: llvm/unittests/Support/FileCheckTest.cpp:282
+ // getUndefVarName() on a pattern variable substitution with a defined
+ // variable is empty.
+ Substitution = FileCheckPatternSubstitution(&Context, "FOO", 42);
----------------
is empty -> returns an empty string.
================
Comment at: llvm/unittests/Support/FileCheckTest.cpp:288
+ // getUndefVarName() on a numeric expression substitution with a defined
+ // variable does not return anything (empty StringRef).
+ FileCheckNumericVariable LineVar = FileCheckNumericVariable("@LINE", 42);
----------------
does not return anything (empty StringRef) -> returns an empty string.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60385/new/
https://reviews.llvm.org/D60385
More information about the llvm-commits
mailing list