[PATCH] D96690: [clangd] Treat paths case-insensitively depending on the platform

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 15 00:04:19 PST 2021


kadircet created this revision.
Herald added subscribers: usaxena95, arphaman.
kadircet requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang.

Path{Match,Exclude} and MountPoint were checking paths case-sensitively
on all platforms, as with other features, this was causing problems on
windows. Since users can have capital drive letters on config files, but
editors might lower-case them.

This patch addresses that issue by:

- Normalizing all the paths being passed to ConfigProvider in ClangdServer.
- Storing MountPoint and regexes used for pathmatching in case-folded manner.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96690

Files:
  clang-tools-extra/clangd/ClangdServer.cpp
  clang-tools-extra/clangd/ConfigCompile.cpp
  clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96690.323676.patch
Type: text/x-patch
Size: 5742 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210215/618361d1/attachment.bin>


More information about the cfe-commits mailing list