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 CanonicalPath); ---------------- It seems that this is only file path suffix matching (by components) now. We should probably rename the function to be explicit. ================ Comment at: clangd/index/CanonicalIncludes.h:62 + llvm::StringMap<std::string> SuffixHeaderMapping; + /// Maximum number of path components stored in a key of SuffixHeaderMapping. + int MaxSuffixComponents = 0; ---------------- It might be worth documenting why this is useful (i.e. the optimization). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51088 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits