This is an archive of the discontinued LLVM Phabricator instance.

YAMLParser: report errors according to provided position
AbandonedPublic

Authored by chfast on Jul 20 2016, 3:58 AM.

Details

Summary

Function yaml::Scanner::setError() has a Position argument that is never used
and is supposed to provide better information about position of an error.
The change uses Position instead of Current source location.

Alternatively, the Position argument can be removed and the code would be
simplified. Unit tests don't care.

Is there any case where Position is not Current and that information is useful?

Diff Detail

Event Timeline

chfast updated this revision to Diff 64657.Jul 20 2016, 3:58 AM
chfast retitled this revision from to YAMLParser: report errors according to provided position.
chfast updated this object.
chfast added reviewers: arphaman, rafael, Bigcheese.
chfast added a subscriber: llvm-commits.
Bigcheese accepted this revision.Jul 20 2016, 12:26 PM
Bigcheese edited edge metadata.

lgtm.

This revision is now accepted and ready to land.Jul 20 2016, 12:26 PM

Ok, thanks. Any thoughts about the alternative "solution"?

I would prefer the alternative. Just get rid of the parameter.

As you are doing something with YAML, can you take a look here?

chfast abandoned this revision.Feb 23 2022, 10:28 AM