[PATCH] D51088: [clangd] Get rid of regexes in CanonicalIncludes
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 22 06:47:13 PDT 2018
ilya-biryukov added inline comments.
================
Comment at: clangd/index/CanonicalIncludes.cpp:24
+ int Components = 0;
+ for (auto It = llvm::sys::path::begin(Suffix),
+ End = llvm::sys::path::end(Suffix);
----------------
ioeric wrote:
> Would `int Components = begin(Suffix) - end(Suffix);` work here?
Surprisingly, `operator -` gives byte difference.
But `std::distance` gives the expected result, added that.
Thanks!
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51088
More information about the cfe-commits
mailing list