Page MenuHomePhabricator

[FileCheck] Fix @LINE value after match failure

Authored by thopre on Jul 9 2019, 2:40 PM.



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.

Diff Detail


Event Timeline

thopre created this revision.Jul 9 2019, 2:40 PM
This revision is now accepted and ready to land.Jul 10 2019, 4:41 AM
This revision was automatically updated to reflect the committed changes.