[all-commits] [llvm/llvm-project] d3a4ef: [clangd] IncludeClenaer: Don't mark forward declar...
Kirill Bobyrev via All-commits
all-commits at lists.llvm.org
Thu Dec 2 01:26:26 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d3a4ef35685c6aaad74294b678e77e1b75af1918
https://github.com/llvm/llvm-project/commit/d3a4ef35685c6aaad74294b678e77e1b75af1918
Author: Kirill Bobyrev <kbobyrev at google.com>
Date: 2021-12-02 (Thu, 02 Dec 2021)
Changed paths:
M clang-tools-extra/clangd/IncludeCleaner.cpp
M clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp
Log Message:
-----------
[clangd] IncludeClenaer: Don't mark forward declarations of a class if it's declared in the main file
This will mark more headers that are unrelated to used symbol but contain its
forawrd declaration. E.g. the following are examples of headers forward
declaring `llvm::StringRef`:
- clang/include/clang/Basic/Cuda.h
- llvm/include/llvm/Support/SHA256.h
- llvm/include/llvm/Support/TrigramIndex.h
- llvm/include/llvm/Support/RandomNumberGenerator.
- ... and more (~50 in total)
This patch is a reduced version of D112707 which was controversial.
Reviewed By: kadircet
Differential Revision: https://reviews.llvm.org/D114864
More information about the All-commits
mailing list