[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE350660: [Query] NFC: Port QueryParser to StringRef (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D56415?vs=180626&id=180740#toc Repository: rCTE Clang Too

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from the nits pointed out; you can fix and commit without another round of review. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-query/QueryParser.cpp:33 + if (Line.empty()) +return StringRef(Line.begin(), 0); steveire wrote: > steveire wrote: > > aaron.ballman wrote: > > > steveire wrote: > > > > aaron.ballman wrote: > > > > >

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: clang-query/QueryParser.cpp:37 +Line = {}; return StringRef(); } aaron.ballman wrote: > steveire wrote: > > aaron.ballman wrote: > > > Why not just return `Line` he

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: clang-query/QueryParser.cpp:33 + if (Line.empty()) +return StringRef(Line.begin(), 0); steveire wrote: > aaron.ballman wrote: > > steveire wrote: > > > aaron.ballman wro

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: clang-query/QueryParser.cpp:33 + if (Line.empty()) +return StringRef(Line.begin(), 0); aaron.ballman wrote: > steveire wrote: > > aaron.ballman wrote: > > > Why not just

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-query/QueryParser.cpp:33 + if (Line.empty()) +return StringRef(Line.begin(), 0); steveire wrote: > aaron.ballman wrote: > > Why not just return `Line`? > It is the pre-existing behavior to return a zer

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 2 inline comments as done. steveire added inline comments. Comment at: clang-query/QueryParser.cpp:33 + if (Line.empty()) +return StringRef(Line.begin(), 0); aaron.ballman wrote: > Why not just return `Line`? It is the pre-existing behavior

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-query/QueryParser.cpp:36 + if (Line.front() == '#') { +Line = {}; return StringRef(); steveire wrote: > kristina wrote: > > I don't think this is the best way of handling it, in fact I'm pretty > >

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added a comment. Thanks, I ran clang-format, and I'd rather let it be the rulemaker, rather than try to add newlines in the lambdas :). Comment at: clang-query/QueryParser.cpp:36 + if (Line.front() == '#') { +Line = {};

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 180626. steveire added a comment. Run clang-format Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56415/new/ https://reviews.llvm.org/D56415 Files: clang-query/QueryParser.cpp clang-query/QueryParser.h Ind

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-07 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a reviewer: kristina. kristina added a comment. LGTM aside from one comment. Comment at: clang-query/QueryParser.cpp:36 + if (Line.front() == '#') { +Line = {}; return StringRef(); I don't think this is the best way of handling it, in f

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. There is no reason for it to not be a StringRef. Making it one simplifies existing code, and makes follow-up features easier. Repository: rCTE Clang Tools Extra https://reviews.l