[PATCH] D56415: NFC: Port QueryParser to StringRef

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 8 01:52:38 PST 2019


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 = {};
     return StringRef();
----------------
kristina wrote:
> I don't think this is the best way of handling it, in fact I'm pretty certain you're leaking memory here.
Hmm, I didn't know we could get a mem leak with StringRef. Can you explain?


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