[all-commits] [llvm/llvm-project] 8eeb3d: [clangd] Rename: merge index/AST refs path-insensi...

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Mon Feb 22 12:19:46 PST 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 8eeb3d99933a3246f2d850b807cf54f11a3a8dce
      https://github.com/llvm/llvm-project/commit/8eeb3d99933a3246f2d850b807cf54f11a3a8dce
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2021-02-22 (Mon, 22 Feb 2021)

  Changed paths:
    M clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
    M clang-tools-extra/clangd/refactor/Rename.cpp
    M clang-tools-extra/clangd/support/CMakeLists.txt
    A clang-tools-extra/clangd/support/Path.cpp
    M clang-tools-extra/clangd/support/Path.h
    M clang-tools-extra/clangd/unittests/RenameTests.cpp

  Log Message:
  -----------
  [clangd] Rename: merge index/AST refs path-insensitively where needed

If you have c:\foo open, and C:\foo indexed (case difference) then these
need to be considered the same file. Otherwise we emit edits to both,
and editors do... something that isn't pretty.

Maybe more centralized normalization is called for, but it's not trivial
to do this while also being case-preserving. see
https://github.com/clangd/clangd/issues/108

Fixes https://github.com/clangd/clangd/issues/665

Differential Revision: https://reviews.llvm.org/D95759

(cherry picked from commit b63cd4db915c08e0cb4cf668a18de24b67f2c44c)


  Commit: d8404633401509936600b60274b72fc03f11f040
      https://github.com/llvm/llvm-project/commit/d8404633401509936600b60274b72fc03f11f040
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2021-02-22 (Mon, 22 Feb 2021)

  Changed paths:
    M clang-tools-extra/clangd/ConfigCompile.cpp
    M clang-tools-extra/clangd/support/Path.cpp
    M clang-tools-extra/clangd/support/Path.h
    M clang-tools-extra/clangd/unittests/CMakeLists.txt
    M clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp
    M clang-tools-extra/clangd/unittests/RenameTests.cpp
    A clang-tools-extra/clangd/unittests/support/PathTests.cpp

  Log Message:
  -----------
  [clangd] Treat paths case-insensitively depending on the platform

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:
- Creating regexes with case-insensitive matching on those platforms.
- Introducing a new pathIsAncestor helper, which performs checks in a
  case-correct manner where needed.

Differential Revision: https://reviews.llvm.org/D96690

(cherry picked from commit ecea7218fb9b994b26471e9877851cdb51a5f1d4)


  Commit: b60110090a942078bbacf71db166c2353c340413
      https://github.com/llvm/llvm-project/commit/b60110090a942078bbacf71db166c2353c340413
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2021-02-22 (Mon, 22 Feb 2021)

  Changed paths:
    M clang-tools-extra/clangd/support/Path.cpp
    M clang-tools-extra/clangd/unittests/support/PathTests.cpp

  Log Message:
  -----------
  [clangd] Fix windows buildbots after ecea7218fb9b994b26471e9877851cdb51a5f1d4

(cherry picked from commit cdef5a7161767c2c4b3b7cb2542cf1d29b6d4a09)


Compare: https://github.com/llvm/llvm-project/compare/76e4c93ea42b...b60110090a94


More information about the All-commits mailing list