From: Thomas Preud'homme Date: Fri, 5 Jul 2019 12:01:12 +0000 (+0000) Subject: [FileCheck] Fix comment in parseNumericVariableUse X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7043cc6c9b578084ab2f080a14604a457aeed61;p=llvm [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365192 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/FileCheck.cpp b/lib/Support/FileCheck.cpp index 2e7fad600c1..7d1febf3c17 100644 --- a/lib/Support/FileCheck.cpp +++ b/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(