[PATCH] D30725: [FileCheck] Added [[@CLEAR:regex]] as a way to clear variables.

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 16:30:01 PST 2017


tra created this revision.

The patch introduces special variable [[@CLEAR:regex]] which
always matches without consuming any input and undefines all
variables that match supplied regex.

This is useful for keeping individual tests in the same file hermetic.
Currently, it's very easy for a failing test to pass because it
happened to use a variable set by a preceding similar test.


https://reviews.llvm.org/D30725

Files:
  docs/CommandGuide/FileCheck.rst
  test/FileCheck/regex-clear.txt
  utils/FileCheck/FileCheck.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30725.90959.patch
Type: text/x-patch
Size: 8365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170308/73ae54dc/attachment.bin>


More information about the llvm-commits mailing list