[all-commits] [llvm/llvm-project] 51f1ae: [clangd] Add new IncludeDirective to IncludeHeader...

David Goldman via All-commits all-commits at lists.llvm.org
Tue Dec 6 10:48:14 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 51f1ae52b0c92a9783e7df328d05b1f95dca74d1
      https://github.com/llvm/llvm-project/commit/51f1ae52b0c92a9783e7df328d05b1f95dca74d1
  Author: David Goldman <davg at google.com>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
    M clang-tools-extra/clangd/CodeComplete.cpp
    M clang-tools-extra/clangd/Headers.cpp
    M clang-tools-extra/clangd/Headers.h
    M clang-tools-extra/clangd/IncludeFixer.cpp
    M clang-tools-extra/clangd/index/Merge.cpp
    M clang-tools-extra/clangd/index/Serialization.cpp
    M clang-tools-extra/clangd/index/Symbol.h
    M clang-tools-extra/clangd/index/SymbolCollector.cpp
    M clang-tools-extra/clangd/index/SymbolCollector.h
    M clang-tools-extra/clangd/index/YAMLSerialization.cpp
    M clang-tools-extra/clangd/index/remote/Index.proto
    M clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
    M clang-tools-extra/clangd/test/index-serialization/Inputs/sample.idx
    M clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
    M clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
    M clang-tools-extra/clangd/unittests/IndexTests.cpp
    M clang-tools-extra/clangd/unittests/SerializationTests.cpp
    M clang/include/clang/Tooling/Inclusions/HeaderAnalysis.h
    M clang/lib/Tooling/Inclusions/HeaderAnalysis.cpp
    M clang/unittests/Tooling/HeaderAnalysisTest.cpp

  Log Message:
  -----------
  [clangd] Add new IncludeDirective to IncludeHeaderWithReferences

The IncludeDirective contains both Include (the current behavior) and Import,
which we can use in the future to provide #import suggestions for
Objective-C files/symbols.

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


  Commit: fc46d6e67fab06d54c8948ebf959d62984116bc3
      https://github.com/llvm/llvm-project/commit/fc46d6e67fab06d54c8948ebf959d62984116bc3
  Author: David Goldman <davg at google.com>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
    M clang-tools-extra/clangd/CodeComplete.cpp
    M clang-tools-extra/clangd/Headers.cpp
    M clang-tools-extra/clangd/Headers.h
    M clang-tools-extra/clangd/IncludeFixer.cpp
    M clang-tools-extra/clangd/IncludeFixer.h
    M clang-tools-extra/clangd/unittests/HeadersTests.cpp
    M clang/include/clang/Tooling/Inclusions/HeaderIncludes.h
    M clang/lib/Format/Format.cpp
    M clang/lib/Tooling/Inclusions/HeaderIncludes.cpp
    M clang/unittests/Tooling/HeaderIncludesTest.cpp

  Log Message:
  -----------
  [clang][Tooling] Add support for generating #import edits

And make use of this from clangd's CodeComplete and IncludeFixer, although currently they are both restricted only to #include symbols.

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


Compare: https://github.com/llvm/llvm-project/compare/71df24dd3917...fc46d6e67fab


More information about the All-commits mailing list