[all-commits] [llvm/llvm-project] c24c89: [clangd] Get rid of unnecessary source transformat...

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Mon Mar 2 04:38:15 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c24c89d6f0f55bb95995b4f5587c791ac8d738fc
      https://github.com/llvm/llvm-project/commit/c24c89d6f0f55bb95995b4f5587c791ac8d738fc
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2020-03-02 (Mon, 02 Mar 2020)

  Changed paths:
    M clang-tools-extra/clangd/SourceCode.cpp
    M clang-tools-extra/clangd/SourceCode.h
    M clang-tools-extra/clangd/unittests/SourceCodeTests.cpp

  Log Message:
  -----------
  [clangd] Get rid of unnecessary source transformations in locateMacroAt

Summary:
All callers are already passing spelling locations to locateMacroAt.
Also there's no point at looking at macro expansion for figuring out undefs as
it is forbidden to have PP directives inside macro bodies.
Also fixes a bug when the previous sourcelocation is unavailable.

Reviewers: sammccall, hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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


  Commit: 3ae2fc7a8bb3ee074d9fb9c0f235052b86c37aaf
      https://github.com/llvm/llvm-project/commit/3ae2fc7a8bb3ee074d9fb9c0f235052b86c37aaf
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2020-03-02 (Mon, 02 Mar 2020)

  Changed paths:
    M clang-tools-extra/clangd/Hover.cpp
    M clang-tools-extra/clangd/SourceCode.cpp
    M clang-tools-extra/clangd/SourceCode.h
    M clang-tools-extra/clangd/XRefs.cpp
    M clang-tools-extra/clangd/refactor/Rename.cpp
    M clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp
    M clang-tools-extra/clangd/unittests/SourceCodeTests.cpp

  Log Message:
  -----------
  [clangd] Get rid of lexer usage in locateMacroAt

Reviewers: sammccall, hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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


Compare: https://github.com/llvm/llvm-project/compare/7d594cf003d1...3ae2fc7a8bb3


More information about the All-commits mailing list