llvm-6502/unittests/Support
Eli Bendersky 6b731486d4 Add backreference matching capabilities to Support/Regex, with
appropriate unit tests. This change in itself is not expected to
affect any functionality at this point, but it will serve as a
stepping stone to improve FileCheck's variable matching capabilities.

Luckily, our regex implementation already supports backreferences,
although a bit of hacking is required to enable it. It supports both
Basic Regular Expressions (BREs) and Extended Regular Expressions
(EREs), without supporting backrefs for EREs, following POSIX strictly
in this respect. And EREs is what we actually use (rightly). This is
contrary to many implementations (including the default on Linux) of
POSIX regexes, that do allow backrefs in EREs.

Adding backref support to our EREs is a very simple change in the
regcomp parsing code. I fail to think of significant cases where it
would clash with existing things, and can bring more versatility to
the regexes we write. There's always the danger of a backref in a
specially crafted regex causing exponential matching times, but since
we mainly use them for testing purposes I don't think it's a big
problem. [it can also be placed behind a flag specific to FileCheck,
if needed].

For more details, see:

* http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/055840.html
* http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/156878.html



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168802 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 19:00:02 +00:00
..
AlignOfTest.cpp Removing utf-8 smart quote and trailing whitespace 2012-11-17 05:13:16 +00:00
AllocatorTest.cpp BumpPtrAllocator: Make sure threshold cannot be initialized with a value smaller than the slab size. 2012-03-01 22:10:16 +00:00
BlockFrequencyTest.cpp For reasons I can't fathom MSVC supports ULL but not LLU suffixes on long long integer literals. 2012-06-17 14:53:53 +00:00
Casting.cpp Casting.h: Automatically handle isa<Base>(Derived). 2012-10-11 23:30:40 +00:00
CMakeLists.txt Adding MCJIT and MemoryBuffer unit tests 2012-10-04 20:29:44 +00:00
CommandLineTest.cpp Added test for non-static use of cl::opt (fixed in r160170) 2012-08-13 10:43:36 +00:00
ConstantRangeTest.cpp make ConstantRange::zeroExtend() optimal 2012-07-23 20:33:29 +00:00
DataExtractorTest.cpp DataExtractor: Fix integer truncation issues in LEB128 extraction. 2012-08-20 10:52:11 +00:00
EndianTest.cpp Merge System into Support. 2010-11-29 18:16:10 +00:00
FileOutputBufferTest.cpp Initial commit of new FileOutputBuffer support class. 2012-08-01 02:29:50 +00:00
formatted_raw_ostream_test.cpp formatted_raw_ostream: Fix a serious bug in tell(). 2012-09-14 23:15:56 +00:00
IntegersSubsetTest.cpp Revert "IntRange:" as it appears to be breaking self hosting. 2012-07-02 23:22:21 +00:00
LeakDetectorTest.cpp Fix death tests in -Asserts builds. 2010-03-17 01:18:45 +00:00
Makefile
ManagedStatic.cpp Fix Windows build, don't try to #include <pthread.h> when we know it's not 2011-11-14 22:10:23 +00:00
MathExtrasTest.cpp Fixes warnings emitted by Visual Studio 2010 compiler. 2011-03-01 23:11:57 +00:00
MemoryBufferTest.cpp Adding MCJIT and MemoryBuffer unit tests 2012-10-04 20:29:44 +00:00
MemoryTest.cpp Remove DOS line endings. 2012-11-14 20:18:34 +00:00
Path.cpp Properly test the LLVM_USE_RVALUE_REFERENCES macro. 2012-08-15 19:21:42 +00:00
raw_ostream_test.cpp Add raw_ostream::write_escaped, for writing escaped strings. 2009-10-17 20:43:08 +00:00
RegexTest.cpp Add backreference matching capabilities to Support/Regex, with 2012-11-28 19:00:02 +00:00
SwapByteOrderTest.cpp Merge System into Support. 2010-11-29 18:16:10 +00:00
TimeValue.cpp unittests: Merge SystemTests back into SupportTests. 2010-11-29 22:29:04 +00:00
ValueHandleTest.cpp Change all self assignments X=X to (void)X, so that we can turn on a 2010-12-23 00:58:24 +00:00
YAMLParserTest.cpp Allow using MemoryBuffers with yaml::Stream directly. 2012-11-19 23:21:47 +00:00