[PATCH] D30749: [FileCheck] Added --enable-var-scope option to enable scope for regex variables.

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 13:49:04 PST 2017


jlebar accepted this revision.
jlebar added inline comments.
This revision is now accepted and ready to land.


================
Comment at: docs/CommandGuide/FileCheck.rst:357
+If ``--enable-var-scope`` is in effect, all local variables are cleared at the
+beginning of the block.
+
----------------
Nit, "blocks" aren't really a concept in FileCheck.  Maybe we should just say "If ``--enable-var-scope`` is in effect, all local variables (i.e. variables that don't start with "$") are cleared when a CHECK-LABEL is encountered."


================
Comment at: docs/CommandGuide/FileCheck.rst:454
+local.  All local variables get undefined at the beginning of each
+CHECK-LABEL block. Global variables are not affected by CHECK-LABEL.
+This makes it easier to ensure that individual tests are not affected
----------------
Same comment as above about "block".


================
Comment at: utils/FileCheck/FileCheck.cpp:80
+             "do not start with '$' will be reset at the beginning of\n"
+             "each CHECK-LABEL block."));
+
----------------
Same here about "block"


================
Comment at: utils/FileCheck/FileCheck.cpp:1285
+    VariableTable.erase(Var);
+  }
+}
----------------
No need for braces on this one.


https://reviews.llvm.org/D30749





More information about the llvm-commits mailing list