Index: lib/Support/YAMLParser.cpp =================================================================== --- lib/Support/YAMLParser.cpp +++ lib/Support/YAMLParser.cpp @@ -280,13 +280,13 @@ } void setError(const Twine &Message, StringRef::iterator Position) { - if (Current >= End) - Current = End - 1; + if (Position >= End) + Position = End - 1; // Don't print out more errors after the first one we encounter. The rest // are just the result of the first, and have no meaning. if (!Failed) - printError(SMLoc::getFromPointer(Current), SourceMgr::DK_Error, Message); + printError(SMLoc::getFromPointer(Position), SourceMgr::DK_Error, Message); Failed = true; }