[PATCH] D64227: [FileCheck] Fix comment in parseNumericVariableUse

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 4 16:51:02 PDT 2019


thopre created this revision.
thopre added reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk.
thopre added a project: LLVM.

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 <https://reviews.llvm.org/rG71d3f227a790d6cf39d8c6267940e0dc0c237e11> but is no longer the case. This
patch updates the comment accordingly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64227

Files:
  llvm/lib/Support/FileCheck.cpp


Index: llvm/lib/Support/FileCheck.cpp
===================================================================
--- llvm/lib/Support/FileCheck.cpp
+++ llvm/lib/Support/FileCheck.cpp
@@ -151,12 +151,12 @@
     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(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64227.208094.patch
Type: text/x-patch
Size: 1372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190704/dfb7be86/attachment.bin>


More information about the llvm-commits mailing list