aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/FileCheckTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/FileCheckTest.cpp')
-rw-r--r--llvm/unittests/Support/FileCheckTest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/unittests/Support/FileCheckTest.cpp b/llvm/unittests/Support/FileCheckTest.cpp
index b9970ff..7fcd5bb 100644
--- a/llvm/unittests/Support/FileCheckTest.cpp
+++ b/llvm/unittests/Support/FileCheckTest.cpp
@@ -178,6 +178,7 @@ public:
GlobalDefines.emplace_back(std::string("BAR=BAZ"));
EXPECT_FALSE(
errorToBool(Context.defineCmdlineVariables(GlobalDefines, SM)));
+ Context.createLineVariable();
// Call parsePattern to have @LINE defined.
P.parsePattern("N/A", "CHECK", SM, Req);
// parsePattern does not expect to be called twice for the same line and
@@ -192,9 +193,9 @@ public:
bool parseNumVarDefExpect(StringRef Expr) {
StringRef ExprBufferRef = bufferize(SM, Expr);
- StringRef Name;
return errorToBool(FileCheckPattern::parseNumericVariableDefinition(
- ExprBufferRef, Name, &Context, SM));
+ ExprBufferRef, &Context, LineNumber, SM)
+ .takeError());
}
bool parseSubstExpect(StringRef Expr) {