[llvm] [FileCheck] Fix --enable-var-scope for numvars after reassignment (PR #157158)
Thomas Preud'homme via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 9 07:08:26 PDT 2025
================
@@ -1218,6 +1218,8 @@ Pattern::MatchResult Pattern::match(StringRef Buffer,
StringRef MatchedValue = MatchInfo[CaptureParenGroup];
ExpressionFormat Format = DefinedNumericVariable->getImplicitFormat();
APInt Value = Format.valueFromStringRepr(MatchedValue, SM);
+ Context->GlobalNumericVariableTable.try_emplace(NumericVariableDef.getKey(),
----------------
RoboTux wrote:
1 is odd because defineCmdlineVariables is called when processing the CHECK directive while clearLocalVars() is called when check input which happens after. I would expect the assert to work even if we don't delete the variable in clearLocalVars(). I need to look into 2 as it might shed some light on 1. 3 is a good point though.
https://github.com/llvm/llvm-project/pull/157158
More information about the llvm-commits
mailing list