HomePhabricator

[YAMLParser] Scanner::setError - ensure we use the StringRef::iterator argument…

Authored by RKSimon on Apr 3 2020, 10:53 AM.

Description

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

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.

Differential Revision: https://reviews.llvm.org/D76512