[PATCH] D62146: FileCheck: Improve FileCheck variable terminology

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 10:51:26 PDT 2019


probinson added a comment.

A few small things, and LGTM too.



================
Comment at: llvm/docs/CommandGuide/FileCheck.rst:547
+``REGISTER`` occurs later in the file after an "``andw``". :program:`FileCheck`
+string substitution block are always contained in ``[[ ]]`` pairs, and string
+variable names can be formed with the regex ``[a-zA-Z_][a-zA-Z0-9_]*``.  If a
----------------
blocks


================
Comment at: llvm/include/llvm/Support/FileCheck.h:371
   /// Prints the value of successful substitutions or the name of the undefined
   /// pattern or numeric variable preventing such a successful substitution.
   void printSubstitutions(const SourceMgr &SM, StringRef Buffer,
----------------
pattern -> string
remove "such"


================
Comment at: llvm/lib/Support/FileCheck.cpp:387
+          // Handle substitution of string variables ([[<var>]]) defined in
+          // previous CHECK patterns and substitution of numeric expressions.
+          FileCheckSubstitution Substitution =
----------------
comma after "patterns"


================
Comment at: llvm/lib/Support/FileCheck.cpp:469
     size_t InsertOffset = 0;
-    // Substitute all pattern variables and numeric expressions whose value is
-    // known just now. Use of pattern variables defined on the same line are
+    // Substitute all string variables and numeric expressions whose value is
+    // only now known. Use of string variables defined on the same line are
----------------
value is -> values are


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62146/new/

https://reviews.llvm.org/D62146





More information about the llvm-commits mailing list