llvm-project/llvm/lib
Thomas Preud'homme a291b950db [FileCheck] Forbid using var defined on same line
Summary:
Commit r366897 introduced the possibility to set a variable from an
expression, such as [[#VAR2:VAR1+3]]. While introducing this feature, it
introduced extra logic to allow using such a variable on the same line
later on. Unfortunately that extra logic is flawed as it relies on a
mapping from variable to expression defining it when the mapping is from
variable definition to expression. This flaw causes among other issues
PR42896.

This commit avoids the problem by forbidding all use of a variable
defined on the same line, and removes the now useless logic. Redesign
will be done in a later commit because it will require some amount of
refactoring first for the solution to be clean. One example is the need
for some sort of transaction mechanism to set a variable temporarily and
from an expression and rollback if the CHECK pattern does not match so
that diagnostics show the right variable values.

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

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

Tags: #llvm

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

llvm-svn: 370663
2019-09-02 14:04:00 +00:00
..
Analysis [ConstantFolding] Fix 'undef' folding for @llvm.[us]{add,sub}.with.overflow ops (PR43188) 2019-09-01 11:56:52 +00:00
AsmParser [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
BinaryFormat [BinaryFormat] Teach identify_magic about Tapi files. 2019-08-21 21:00:16 +00:00
Bitcode Do a sweep of symbol internalization. NFC. 2019-08-23 19:59:23 +00:00
Bitstream [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
CodeGen [DebugInfo] LiveDebugValues: correctly discriminate kinds of variable locations 2019-09-02 12:28:36 +00:00
DebugInfo [DWARFVerifier] Verify GNU extensions of call site DWARF symbols 2019-09-02 09:20:46 +00:00
Demangle llvm-undname: Correctly demangle vararg parameters 2019-06-04 19:10:08 +00:00
ExecutionEngine [ORCv2] - New Speculate Query Implementation 2019-08-27 18:23:36 +00:00
FuzzMutate [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Fuzzer
IR [FPEnv] Add fptosi and fptoui constrained intrinsics. 2019-08-28 16:33:36 +00:00
IRReader
LTO Do a sweep of symbol internalization. NFC. 2019-08-23 19:59:23 +00:00
LineEditor [CMake] Delete redundant DEPENDS/LINK_LIBS from LineEditor/XRay 2019-06-22 01:50:21 +00:00
Linker Linker: Add support for GlobalIFunc. 2019-08-08 22:09:18 +00:00
MC [MC] Avoid crashes from improperly nested or wrong target .seh_handlerdata directives 2019-08-30 22:25:55 +00:00
MCA [Tblgen][MCA] Add the ability to mark groups as LoadQueue and StoreQueue. NFCI 2019-08-27 18:20:34 +00:00
Object [LLD] [COFF] Support merging resource object files 2019-08-30 06:56:33 +00:00
ObjectYAML [yaml2obj] - Allow overriding sh_name fields of the sections. 2019-09-02 09:47:17 +00:00
Option [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Passes [LoopPassManager + MemorySSA] Only enable use of MemorySSA for LPMs known to preserve it. 2019-08-21 17:00:57 +00:00
ProfileData Fix some errors introduced by rL370563 which were not exposed on my local machine. 2019-08-31 03:17:49 +00:00
Remarks Do a sweep of symbol internalization. NFC. 2019-08-23 19:59:23 +00:00
Support [FileCheck] Forbid using var defined on same line 2019-09-02 14:04:00 +00:00
TableGen [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Target [AMDGPU][MC][GFX10] Enabled null with 64-bit operands 2019-09-02 13:42:25 +00:00
Testing [Testing] Move clangd::Annotations to llvm testing support 2019-04-25 10:08:31 +00:00
TextAPI [TextAPI] Update reader to be supported by lib/Object 2019-08-16 15:30:48 +00:00
ToolDrivers [llvm-dlltool] Handle external and internal names with differing decoration 2019-09-02 13:28:16 +00:00
Transforms [InstCombine] recognize bswap disguised as shufflevector 2019-09-02 13:33:20 +00:00
WindowsManifest Fight a bit against global initializers. NFC. 2019-08-22 19:43:27 +00:00
XRay [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
CMakeLists.txt Fix build errors LLVM tests are disabled. 2019-07-11 22:08:35 +00:00
LLVMBuild.txt [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00