[PATCH] D45764: [clangd][tests] Fix delimiter handling
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 19 04:19:05 PDT 2018
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Oops, thanks! LG, optional suggestion
================
Comment at: JSONRPCDispatcher.cpp:281
// found a delimiter
- if (LineRef.find_first_not_of('-') == llvm::StringRef::npos)
+ if (LineRef.rtrim() == "---")
break;
----------------
This trades one gotcha (empty lines delimit) for another (---- looks valid, but isn't).
What about adding LineRef.startswith("-") to the original check?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45764
More information about the cfe-commits
mailing list