[llvm] r365192 - [FileCheck] Fix comment in parseNumericVariableUse

Thomas Preud'homme via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 5 05:01:12 PDT 2019


Author: thopre
Date: Fri Jul  5 05:01:12 2019
New Revision: 365192

URL: http://llvm.org/viewvc/llvm-project?rev=365192&view=rev
Log:
[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

Modified:
    llvm/trunk/lib/Support/FileCheck.cpp

Modified: llvm/trunk/lib/Support/FileCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/FileCheck.cpp?rev=365192&r1=365191&r2=365192&view=diff
==============================================================================
--- llvm/trunk/lib/Support/FileCheck.cpp (original)
+++ llvm/trunk/lib/Support/FileCheck.cpp Fri Jul  5 05:01:12 2019
@@ -151,12 +151,12 @@ FileCheckPattern::parseNumericVariableUs
     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(




More information about the llvm-commits mailing list