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

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 10:44:53 PST 2017


tra created this revision.
Herald added a subscriber: wdng.

This implements Hal's idea suggested in https://reviews.llvm.org/D30725.

If ``--enable-var-scope`` is in effect, variables with names that
start with `$` are considered to be global. All others variables are
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
by variables set in preceding tests.

The feature is not enabled by default as there are few hundred tests that depend on variables remaining set across CHECK-LABEL.
Once tests are cleaned up we can flip the flag to be enabled by default.


https://reviews.llvm.org/D30749

Files:
  docs/CommandGuide/FileCheck.rst
  test/FileCheck/line-count.txt
  test/FileCheck/regex-scope.txt
  utils/FileCheck/FileCheck.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30749.91051.patch
Type: text/x-patch
Size: 5827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170308/9a87d0ac/attachment.bin>


More information about the llvm-commits mailing list