This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE340410: [clangd] Get rid of regexes in CanonicalIncludes
(authored by ibiryukov, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D51088?vs=161945&id=161946#toc
Repository:
rCTE Cl
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)
ilya-biryukov updated this revision to Diff 161945.
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
- Use std::distance instead of an explicit loop
- Merge break into loop condition
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51088
Files:
cla
ioeric accepted this revision.
ioeric added inline comments.
This revision is now accepted and ready to land.
Comment at: clangd/index/CanonicalIncludes.cpp:24
+ int Components = 0;
+ for (auto It = llvm::sys::path::begin(Suffix),
+End = llvm::sys::path::end(Suffix)
ilya-biryukov updated this revision to Diff 161932.
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
- s/addSuffixMapping/addFileSuffixMapping
- Document the intention of MaxSuffixComponents
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51088
File
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added inline comments.
Comment at: clangd/index/CanonicalIncludes.h:44
/// Maps all files matching \p RE to \p CanonicalPath
- void addRegexMapping(llvm::StringRef RE, llvm::StringRef CanonicalPath);
+ void addSuf
ioeric added inline comments.
Comment at: clangd/index/CanonicalIncludes.h:44
/// Maps all files matching \p RE to \p CanonicalPath
- void addRegexMapping(llvm::StringRef RE, llvm::StringRef CanonicalPath);
+ void addSuffixMapping(llvm::StringRef Suffix, llvm::StringRef Cano
ilya-biryukov created this revision.
ilya-biryukov added reviewers: ioeric, kbobyrev.
Herald added subscribers: kadircet, jfb, arphaman, jkorous, MaskRay.
Replace them with suffix mappings.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51088
Files:
clangd/index/CanonicalIncl