diff options
Diffstat (limited to 'lib/Support/YAMLParser.cpp')
-rw-r--r-- | lib/Support/YAMLParser.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Support/YAMLParser.cpp b/lib/Support/YAMLParser.cpp index 4688ff1..6ae7945 100644 --- a/lib/Support/YAMLParser.cpp +++ b/lib/Support/YAMLParser.cpp @@ -1528,12 +1528,10 @@ Stream::~Stream() {} bool Stream::failed() { return scanner->failed(); } void Stream::printError(Node *N, const Twine &Msg) { - SmallVector<SMRange, 1> Ranges; - Ranges.push_back(N->getSourceRange()); scanner->printError( N->getSourceRange().Start , SourceMgr::DK_Error , Msg - , Ranges); + , N->getSourceRange()); } document_iterator Stream::begin() { @@ -1570,11 +1568,11 @@ std::string Node::getVerbatimTag() const { if (Raw.find_last_of('!') == 0) { Ret = Doc->getTagMap().find("!")->second; Ret += Raw.substr(1); - return std::move(Ret); + return Ret; } else if (Raw.startswith("!!")) { Ret = Doc->getTagMap().find("!!")->second; Ret += Raw.substr(2); - return std::move(Ret); + return Ret; } else { StringRef TagHandle = Raw.substr(0, Raw.find_last_of('!') + 1); std::map<StringRef, StringRef>::const_iterator It = @@ -1588,7 +1586,7 @@ std::string Node::getVerbatimTag() const { setError(Twine("Unknown tag handle ") + TagHandle, T); } Ret += Raw.substr(Raw.find_last_of('!') + 1); - return std::move(Ret); + return Ret; } } |