Page MenuHomePhabricator

[FileCheck] Store line numbers as optional values

Authored by thopre on Jul 12 2019, 7:59 AM.



Processing of command-line definition of variable and logic around
implicit not directives both reuse parsing code that expects a line
number to be defined. So far, a special line number of 0 was used for
those users of the parsing code where a line number does not make sense.
This commit instead represents line numbers as Optional values so that
they can be None for those cases.

Diff Detail


Event Timeline

thopre created this revision.Jul 12 2019, 7:59 AM

Looks good, aside from one question.

186 ↗(On Diff #209487)

Is the IsPseudo field here redundant now? Are there pseudo variables with a defined line number?

thopre updated this revision to Diff 209813.Jul 15 2019, 5:47 AM
thopre marked 2 inline comments as done.

Address review comment

186 ↗(On Diff #209487)

No indeed and even if there as it's irrelevant. What matters is whether the Definition line number is same the current line.

This revision is now accepted and ready to land.Jul 15 2019, 5:56 AM
This revision was automatically updated to reflect the committed changes.