1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/unittests/Support
Thomas Preud'homme f562841f29 FileCheck [8/12]: Define numeric var from expr
Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch lift the restriction for a
numeric expression to either be a variable definition or a numeric
expression to try to match.

This commit allows a numeric variable to be set to the result of the
evaluation of a numeric expression after it has been matched
successfully. When it happens, the variable is allowed to be used on
the same line since its value is known at match time.

It also makes use of this possibility to reuse the parsing code to
parse a command-line definition by crafting a mirror string of the
-D option with the equal sign replaced by a colon sign, e.g. for option
'-D#NUMVAL=10' it creates the string
'-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression
is parsed to define NUMVAL. This result in a few tests needing updating
for the location diagnostics on top of the tests for the new feature.

It also enables empty numeric expression which match any number without
defining a variable. This is done here rather than in commit #5 of the
patch series because it requires to dissociate automatic regex insertion
in RegExStr from variable definition which would make commit #5 even
bigger than it already is.

Copyright:
    - Linaro (changes up to diff 183612 of revision D55940)
    - GraphCore (changes in later versions of revision D55940 and
                 in new revision created off D55940)

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60388

llvm-svn: 366860
2019-07-23 22:41:38 +00:00
..
DynamicLibrary Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AlignOfTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AllocatorTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AnnotationsTest.cpp [Support] Try to unbreak windows buildbot 2019-04-25 11:57:40 +00:00
ARMAttributeParser.cpp [ARM] add target arch definitions for 8.1-M and MVE 2019-05-30 12:57:04 +00:00
ArrayRecyclerTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BinaryStreamTest.cpp [Support] Add LEB128 support to BinaryStreamReader/Writer. 2019-04-17 15:38:27 +00:00
BlockFrequencyTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BranchProbabilityTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CachePruningTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Casting.cpp [llvm] Add isa_and_nonnull 2019-04-05 13:59:24 +00:00
CheckedArithmeticTest.cpp Add checkMulAdd helper function to CheckedArithmetic 2018-06-13 18:32:02 +00:00
Chrono.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [Testing] Move clangd::Annotations to llvm testing support 2019-04-25 10:08:31 +00:00
CommandLineTest.cpp Revert Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the Option class." 2019-07-11 08:54:28 +00:00
CompressionTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ConvertUTFTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CrashRecoveryTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CRCTest.cpp Attempt to recommit r357901 2019-04-08 12:31:12 +00:00
DataExtractorTest.cpp [Support] Fix error handling in DataExtractor::get[US]LEB128 2019-06-24 09:11:24 +00:00
DebugCounterTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DebugTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DJBTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
EndianStreamTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
EndianTest.cpp [Support/Endian] Add support for endian-specific enums 2019-03-11 09:06:18 +00:00
ErrnoTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ErrorOrTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ErrorTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FileCheckTest.cpp FileCheck [8/12]: Define numeric var from expr 2019-07-23 22:41:38 +00:00
FileOutputBufferTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
formatted_raw_ostream_test.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatVariadicTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobPatternTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Host.cpp Appease MSVC builds by #ifdef wrapping runAndGetCommandOutput tests. NFCI. 2019-03-13 11:51:13 +00:00
ItaniumManglingCanonicalizerTest.cpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
JSONTest.cpp [Support] Add JSON streaming output API, faster where the heavy value types aren't needed. 2019-04-25 12:51:42 +00:00
KnownBitsTest.cpp [KnownBits] Add computeForAddCarry() 2019-04-12 18:18:08 +00:00
LEB128Test.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LineIteratorTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LockFileManagerTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ManagedStatic.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MatchersTest.cpp [Support] Add a GTest matcher for Optional<T> 2019-04-25 09:03:32 +00:00
MathExtrasTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MD5Test.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MemoryBufferTest.cpp [Support] Move llvm::MemoryBuffer to sys::fs::file_t 2019-07-10 00:34:13 +00:00
MemoryTest.cpp [Support] Renamed member 'Size' to 'AllocatedSize' in MemoryBlock and OwningMemoryBlock. 2019-05-20 20:53:05 +00:00
NativeFormatTests.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ParallelTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Path.cpp [llvm-objcopy] Don't change permissions of non-regular output files 2019-07-11 10:17:59 +00:00
ProcessTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProgramTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
raw_ostream_test.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
raw_pwrite_stream_test.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
raw_sha1_ostream_test.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegexTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ReplaceFileTest.cpp [Support] Move llvm::MemoryBuffer to sys::fs::file_t 2019-07-10 00:34:13 +00:00
ReverseIterationTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ScaledNumberTest.cpp Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
SourceMgrTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SpecialCaseListTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StringPool.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SwapByteOrderTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SymbolRemappingReaderTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TargetParserTest.cpp Revert [AArch64] Add support for Transactional Memory Extension (TME) 2019-07-17 17:43:32 +00:00
TarWriterTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TaskQueueTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Threading.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ThreadLocalTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ThreadPool.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TimerTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TrailingObjectsTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TrigramIndexTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TypeNameTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TypeTraitsTest.cpp Fix compilation warnings when compiling with GCC 7.3 2019-05-06 13:41:54 +00:00
UnicodeTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VersionTupleTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VirtualFileSystemTest.cpp [VFS] Add reverse iterator to OverlayFileSystem 2019-07-03 00:45:53 +00:00
xxhashTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
YAMLIOTest.cpp [YAMLIO] Wrap explicit specialization in llvm::yaml to appease build bots 2019-07-12 06:23:24 +00:00
YAMLParserTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00