[PATCH] D56415: NFC: Port QueryParser to StringRef
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 8 08:51:51 PST 2019
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` here as well?
> > That's pre-existing. Seems more clear to leave it as is.
> I don't have a strong preference, but I raised the point because it seems odd to explicitly clear a `StringRef` and then return a new, different, empty `StringRef` on the next line.
Well, code changes, and `Line` may not always be empty here. As it is, this communicates that we're returning an empty `StringRef` and always will (until this line has a reason to change).
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56415/new/
https://reviews.llvm.org/D56415
More information about the cfe-commits
mailing list