From de4533621c50ddea8639b73f1cc57664b313881c Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 8 Jan 2019 22:27:08 +0000 Subject: [Query] NFC: Port QueryParser to StringRef Summary: There is no reason for it to not be a StringRef. Making it one simplifies existing code, and makes follow-up features easier. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56415 llvm-svn: 350660 --- clang-tools-extra/clang-query/QueryParser.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang-tools-extra/clang-query/QueryParser.h') diff --git a/clang-tools-extra/clang-query/QueryParser.h b/clang-tools-extra/clang-query/QueryParser.h index 6730f990190..56eb5a9abae 100644 --- a/clang-tools-extra/clang-query/QueryParser.h +++ b/clang-tools-extra/clang-query/QueryParser.h @@ -37,7 +37,7 @@ public: private: QueryParser(StringRef Line, const QuerySession &QS) - : Begin(Line.begin()), End(Line.end()), CompletionPos(nullptr), QS(QS) {} + : Line(Line), CompletionPos(nullptr), QS(QS) {} StringRef lexWord(); @@ -55,8 +55,7 @@ private: /// \c InvalidQuery if a parse error occurs. QueryRef doParse(); - const char *Begin; - const char *End; + StringRef Line; const char *CompletionPos; std::vector Completions; -- cgit v1.2.3