[llvm] r284348 - Support: Return void from Scanner::scan_ns_uri_char, no one uses the result
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 16 15:01:23 PDT 2016
Author: bogner
Date: Sun Oct 16 17:01:22 2016
New Revision: 284348
URL: http://llvm.org/viewvc/llvm-project?rev=284348&view=rev
Log:
Support: Return void from Scanner::scan_ns_uri_char, no one uses the result
Simplify this a little bit since the result is never used. It can be
added back easily enough if that changes.
Modified:
llvm/trunk/lib/Support/YAMLParser.cpp
Modified: llvm/trunk/lib/Support/YAMLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/YAMLParser.cpp?rev=284348&r1=284347&r2=284348&view=diff
==============================================================================
--- llvm/trunk/lib/Support/YAMLParser.cpp (original)
+++ llvm/trunk/lib/Support/YAMLParser.cpp Sun Oct 16 17:01:22 2016
@@ -360,10 +360,7 @@ private:
/// @brief Scan ns-uri-char[39]s starting at Cur.
///
/// This updates Cur and Column while scanning.
- ///
- /// @returns A StringRef starting at Cur which covers the longest contiguous
- /// sequence of ns-uri-char.
- StringRef scan_ns_uri_char();
+ void scan_ns_uri_char();
/// @brief Consume a minimal well-formed code unit subsequence starting at
/// \a Cur. Return false if it is not the same Unicode scalar value as
@@ -883,8 +880,7 @@ static bool is_ns_word_char(const char C
|| (C >= 'A' && C <= 'Z');
}
-StringRef Scanner::scan_ns_uri_char() {
- StringRef::iterator Start = Current;
+void Scanner::scan_ns_uri_char() {
while (true) {
if (Current == End)
break;
@@ -900,7 +896,6 @@ StringRef Scanner::scan_ns_uri_char() {
} else
break;
}
- return StringRef(Start, Current - Start);
}
bool Scanner::consume(uint32_t Expected) {
More information about the llvm-commits
mailing list