This is an archive of the discontinued LLVM Phabricator instance.

[YAMLIO] Correctly diagnose empty alias/anchor
ClosedPublic

Authored by scott.linder on Nov 13 2020, 2:09 PM.

Details

Summary

The Range of an alias/anchor token includes the leading & or *,
but it is skipped while parsing the name. The check for an empty name
fails to account for the skipped leading character and so the error is
never hit.

Fix the off-by-one and add a couple regression tests.

Diff Detail

Event Timeline

scott.linder created this revision.Nov 13 2020, 2:09 PM
scott.linder requested review of this revision.Nov 13 2020, 2:09 PM
dexonsmith accepted this revision.Nov 13 2020, 2:19 PM

LGTM, thanks!

This revision is now accepted and ready to land.Nov 13 2020, 2:19 PM
This revision was landed with ongoing or failed builds.Nov 16 2020, 10:45 AM
This revision was automatically updated to reflect the committed changes.