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

2021-02-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGecea7218fb9b: [clangd] Treat paths case-insensitively depending on the platform (authored by kadircet). Changed prior to commit: https://reviews.l

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

2021-02-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/support/Path.cpp:22 -bool pathEqual(PathRef A, PathRef B) { -#if defined(_WIN32) || defined(__APPLE__) - return A.equals_lower(B); -#else - return A == B; -#endif +bool pathIsAncestor(PathRef Ancestor, PathR

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

2021-02-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 323997. kadircet marked an inline comment as done. kadircet added a comment. - s/pathIsAncestor/pathStartsWith - Fix tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96690/new/ https://reviews.llvm.org/D966

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

2021-02-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Nice, thank you! Comment at: clang-tools-extra/clangd/support/Path.cpp:22 -bool pathEqual(PathRef A, PathRef B) { -#if defined(_WIN32) || defined(__APPLE__) - return

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

2021-02-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 323951. kadircet added a comment. Herald added subscribers: ormris, mgorny. - Don't case fold stored strings, or the ones passing interface boundaries - Define a `pathIsAncestor` helper instead and use that for comparison of MountPoint - Expose a CLANGD_PATH

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

2021-02-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for the important fix. This contains a mixture of changing comparison-of-paths to be case insensitive, and case-normalizing stored paths so we can use case-sensitive comparisons. I think we should stick to *only* changing comparison-of-path logic as much as po

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

2021-02-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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 pl