From 41f2bea60c6a7886df1fb99c8133033c01a838f5 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Fri, 5 Jul 2019 12:01:12 +0000 Subject: [FileCheck] Fix comment in parseNumericVariableUse Summary: Comment explaining the interaction between parsing of numeric variable definition and uses in parseNumericVariableUse is stale since it suggests both use and definition parsing is done in the same function. This was the case in a previous version of the patch committed as 71d3f227a790d6cf39d8c6267940e0dc0c237e11 but is no longer the case. This patch updates the comment accordingly. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64227 llvm-svn: 365192 --- llvm/lib/Support/FileCheck.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Support/FileCheck.cpp') diff --git a/llvm/lib/Support/FileCheck.cpp b/llvm/lib/Support/FileCheck.cpp index 2e7fad6..7d1febf 100644 --- a/llvm/lib/Support/FileCheck.cpp +++ b/llvm/lib/Support/FileCheck.cpp @@ -151,12 +151,12 @@ FileCheckPattern::parseNumericVariableUse(StringRef &Expr, return FileCheckErrorDiagnostic::get( SM, Name, "invalid pseudo numeric variable '" + Name + "'"); - // This method is indirectly called from parsePattern for all numeric - // variable definitions and uses in the order in which they appear in the - // CHECK pattern. For each definition, the pointer to the class instance of - // the corresponding numeric variable definition is stored in - // GlobalNumericVariableTable. Therefore, the pointer we get below is for the - // class instance corresponding to the last definition of this variable use. + // Numeric variable definitions and uses are parsed in the order in which + // they appear in the CHECK patterns. For each definition, the pointer to the + // class instance of the corresponding numeric variable definition is stored + // in GlobalNumericVariableTable in parsePattern. Therefore, the pointer we + // get below is for the class instance corresponding to the last definition + // of this variable use. auto VarTableIter = Context->GlobalNumericVariableTable.find(Name); if (VarTableIter == Context->GlobalNumericVariableTable.end()) return FileCheckErrorDiagnostic::get( -- cgit v1.1