HomePhabricator

[FileCheck] Fix @LINE value after match failure

Authored by thopre on Jul 10 2019, 5:49 AM.

Description

[FileCheck] Fix @LINE value after match failure

Summary:
The value of the FileCheckNumericVariable class instance representing
the @LINE numeric variable is set and cleared respectively before and
after substitutions are made, if any. However, when a substitution
fails, the value is not cleared. This causes the next substitution of
@LINE later on to give the wrong value since setValue is a nop if the
value is already set. This is what caused failures after commit r365249.

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/D64449

llvm-svn: 365624

Details

Committed
thopreJul 10 2019, 5:49 AM
Differential Revision
D64449: [FileCheck] Fix @LINE value after match failure
Parents
rG775b2f598a99: [NFC][ARM] Convert lambdas to static helpers
Branches
Unknown
Tags
Unknown