[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:29 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:

Please add a comment here to explain why it needs to be added despite this being already done in the parsing. Mention the clearLocalVars() function.

https://github.com/llvm/llvm-project/pull/157158


More information about the llvm-commits mailing list