This is an archive of the discontinued LLVM Phabricator instance.

[YAMLParser] Scanner::setError - ensure we use the StringRef::iterator argument (PR45043)
ClosedPublic

Authored by RKSimon on Mar 20 2020, 9:42 AM.

Details

Summary

As detailed on PR45043, static analysis was warning that the StringRef::iterator Position argument was being ignored and the function was hardwired to use the Current iterator.

This patch ensures we use the provided iterator and removes the (barely necessary) setError wrapper that always used Current.

Diff Detail

Event Timeline

RKSimon created this revision.Mar 20 2020, 9:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2020, 9:42 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
bkramer accepted this revision.Apr 3 2020, 8:40 AM

makes sense to me

This revision is now accepted and ready to land.Apr 3 2020, 8:40 AM
thomasfinch accepted this revision.Apr 3 2020, 9:58 AM
This revision was automatically updated to reflect the committed changes.