This is an archive of the discontinued LLVM Phabricator instance.

[Test][FileCheck] Fix use of undef var
ClosedPublic

Authored by thopre on Dec 15 2020, 3:05 PM.

Details

Summary

The test related to directives with prefix NUMEXPR-CONSTRAINT-NOMATCH
refers to the numeric variable UNSI which is defined by a directive with
prefix CHECK not enabled on the lit command-line. Rather than adding the
prefix CHECK to the lit command-line, this commit defined variable UNSI
in a new NUMEXPR-CONSTRAINT-NOMATCH prefixed directive. The directive
needs to contain more than just the variable otherwise the error message
from FileCheck is about the wrong line being matched.

Diff Detail

Event Timeline

thopre requested review of this revision.Dec 15 2020, 3:05 PM
thopre created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2020, 3:05 PM
jhenderson added inline comments.Jan 7 2021, 12:28 AM
llvm/test/FileCheck/numeric-expression.txt
249

Rather than requiring the whole CHECK patterns to be checked as part of this, would it make more sense to just use -D to define UNSI, something like the suggested edit?

thopre updated this revision to Diff 315146.Jan 7 2021, 8:11 AM

Define UNSI with the rightly prefixed directive

thopre edited the summary of this revision. (Show Details)Jan 7 2021, 8:11 AM
This revision is now accepted and ready to land.Jan 7 2021, 11:58 PM
This revision was automatically updated to reflect the committed changes.