diff options
author | Stephen Kelly <steveire@gmail.com> | 2019-01-08 22:27:08 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2019-01-08 22:27:08 +0000 |
commit | de4533621c50ddea8639b73f1cc57664b313881c (patch) | |
tree | 44eb4bb152314279a86e912da4648b9623c74e74 /clang-tools-extra/clang-query/QueryParser.h | |
parent | dadbb45f34dbba4f311adecfd484400e8e82d9d0 (diff) | |
download | bcm5719-llvm-de4533621c50ddea8639b73f1cc57664b313881c.tar.gz bcm5719-llvm-de4533621c50ddea8639b73f1cc57664b313881c.zip |
[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
Diffstat (limited to 'clang-tools-extra/clang-query/QueryParser.h')
-rw-r--r-- | clang-tools-extra/clang-query/QueryParser.h | 5 |
1 files changed, 2 insertions, 3 deletions
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<llvm::LineEditor::Completion> Completions; |