diff options
| author | Aiden Grossman <aidengrossman@google.com> | 2025-09-12 01:05:48 +0000 |
|---|---|---|
| committer | Aiden Grossman <aidengrossman@google.com> | 2025-09-12 01:05:48 +0000 |
| commit | 88a52e1fc6d3e153132f0e0a86431762adf8c0c4 (patch) | |
| tree | bae8c1b720736edc54705c325c5bfb95b459eda2 /llvm/lib/FileCheck/FileCheck.cpp | |
| parent | 1873dd7e8bb03319500a9f4b51e9e498a8fb70de (diff) | |
| parent | 2740e4b73682eb7a6869c333991a608304938952 (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/boomanaiden154/main.clang-invoke-shell-script-with-bash
Created using spr 1.3.6
[skip ci]
Diffstat (limited to 'llvm/lib/FileCheck/FileCheck.cpp')
| -rw-r--r-- | llvm/lib/FileCheck/FileCheck.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/FileCheck/FileCheck.cpp b/llvm/lib/FileCheck/FileCheck.cpp index ce35a5bad761..9245db442611 100644 --- a/llvm/lib/FileCheck/FileCheck.cpp +++ b/llvm/lib/FileCheck/FileCheck.cpp @@ -1218,6 +1218,14 @@ Pattern::MatchResult Pattern::match(StringRef Buffer, StringRef MatchedValue = MatchInfo[CaptureParenGroup]; ExpressionFormat Format = DefinedNumericVariable->getImplicitFormat(); APInt Value = Format.valueFromStringRepr(MatchedValue, SM); + // Numeric variables are already inserted into GlobalNumericVariableTable + // during parsing, but clearLocalVars might remove them, so we must + // reinsert them. Numeric-variable resolution does not access + // GlobalNumericVariableTable; it directly uses a pointer to the variable. + // However, other functions (such as clearLocalVars) may require active + // variables to be in the table. + Context->GlobalNumericVariableTable.try_emplace(NumericVariableDef.getKey(), + DefinedNumericVariable); DefinedNumericVariable->setValue(Value, MatchedValue); } |
