diff options
author | Sam McCall <sam.mccall@gmail.com> | 2022-02-26 13:40:12 +0300 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2022-02-26 14:00:16 +0300 |
commit | 4d006520b8c0cc3a52913b4665bf741c737e5592 (patch) | |
tree | 79635eb8929fff4d3f4113225aa53cb121f89ed0 /clang-tools-extra | |
parent | 7ca7d8126d4e47b48dbeb1bd3efd462c5bd889b1 (diff) |
[clangd] Clean up unused includes. NFCI
Add includes where needed to fix build.
Haven't systematically added used headers, so there is still accidental
dependency on transitive includes.
Diffstat (limited to 'clang-tools-extra')
190 files changed, 117 insertions, 489 deletions
diff --git a/clang-tools-extra/clangd/AST.cpp b/clang-tools-extra/clangd/AST.cpp index fe9c4c9f0b18..30c2a14b42bc 100644 --- a/clang-tools-extra/clangd/AST.cpp +++ b/clang-tools-extra/clangd/AST.cpp @@ -8,7 +8,6 @@ #include "AST.h" -#include "FindTarget.h" #include "SourceCode.h" #include "clang/AST/ASTContext.h" #include "clang/AST/ASTTypeTraits.h" @@ -32,7 +31,6 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" -#include "llvm/Support/ScopedPrinter.h" #include "llvm/Support/raw_ostream.h" #include <string> #include <vector> diff --git a/clang-tools-extra/clangd/AST.h b/clang-tools-extra/clangd/AST.h index afd591f0f4b4..3ea015574dda 100644 --- a/clang-tools-extra/clangd/AST.h +++ b/clang-tools-extra/clangd/AST.h @@ -19,7 +19,6 @@ #include "clang/AST/NestedNameSpecifier.h" #include "clang/Basic/SourceLocation.h" #include "clang/Lex/MacroInfo.h" -#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/StringRef.h" #include <string> #include <vector> diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp index 0ec2052d094d..9b826bb37315 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -9,9 +9,8 @@ #include "ClangdLSPServer.h" #include "ClangdServer.h" #include "CodeComplete.h" +#include "CompileCommands.h" #include "Diagnostics.h" -#include "DraftStore.h" -#include "DumpAST.h" #include "Feature.h" #include "GlobalCompilationDatabase.h" #include "LSPBinder.h" @@ -21,22 +20,19 @@ #include "TUScheduler.h" #include "URI.h" #include "refactor/Tweak.h" +#include "support/Cancellation.h" #include "support/Context.h" #include "support/MemoryTree.h" #include "support/Trace.h" -#include "clang/AST/ASTContext.h" #include "clang/Tooling/Core/Replacement.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/iterator_range.h" #include "llvm/Support/Allocator.h" -#include "llvm/Support/Errc.h" #include "llvm/Support/Error.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/JSON.h" -#include "llvm/Support/Path.h" #include "llvm/Support/SHA1.h" #include "llvm/Support/ScopedPrinter.h" #include "llvm/Support/raw_ostream.h" diff --git a/clang-tools-extra/clangd/ClangdLSPServer.h b/clang-tools-extra/clangd/ClangdLSPServer.h index 27c65bade216..1c52ebfe97c9 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.h +++ b/clang-tools-extra/clangd/ClangdLSPServer.h @@ -10,8 +10,6 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDLSPSERVER_H #include "ClangdServer.h" -#include "DraftStore.h" -#include "FindSymbols.h" #include "GlobalCompilationDatabase.h" #include "LSPBinder.h" #include "Protocol.h" @@ -20,9 +18,7 @@ #include "support/MemoryTree.h" #include "support/Path.h" #include "support/Threading.h" -#include "clang/Tooling/Core/Replacement.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/StringSet.h" #include "llvm/Support/JSON.h" #include <chrono> #include <cstddef> diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp index a7210e0526a4..f9ac911aaf5a 100644 --- a/clang-tools-extra/clangd/ClangdServer.cpp +++ b/clang-tools-extra/clangd/ClangdServer.cpp @@ -14,7 +14,6 @@ #include "FindSymbols.h" #include "Format.h" #include "HeaderSourceSwitch.h" -#include "Headers.h" #include "InlayHints.h" #include "ParsedAST.h" #include "Preamble.h" @@ -29,28 +28,21 @@ #include "index/Merge.h" #include "refactor/Rename.h" #include "refactor/Tweak.h" +#include "support/Cancellation.h" #include "support/Logger.h" -#include "support/Markup.h" #include "support/MemoryTree.h" #include "support/ThreadsafeFS.h" #include "support/Trace.h" #include "clang/Format/Format.h" -#include "clang/Frontend/CompilerInstance.h" -#include "clang/Frontend/CompilerInvocation.h" #include "clang/Lex/Preprocessor.h" #include "clang/Tooling/CompilationDatabase.h" #include "clang/Tooling/Core/Replacement.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/ScopeExit.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/Errc.h" #include "llvm/Support/Error.h" -#include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" -#include "llvm/Support/ScopedPrinter.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> #include <chrono> diff --git a/clang-tools-extra/clangd/ClangdServer.h b/clang-tools-extra/clangd/ClangdServer.h index b6325fa567ac..a37b3c97d911 100644 --- a/clang-tools-extra/clangd/ClangdServer.h +++ b/clang-tools-extra/clangd/ClangdServer.h @@ -9,7 +9,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDSERVER_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDSERVER_H -#include "../clang-tidy/ClangTidyOptions.h" #include "CodeComplete.h" #include "ConfigProvider.h" #include "Diagnostics.h" @@ -26,15 +25,12 @@ #include "index/Index.h" #include "refactor/Rename.h" #include "refactor/Tweak.h" -#include "support/Cancellation.h" #include "support/Function.h" #include "support/MemoryTree.h" #include "support/Path.h" #include "support/ThreadsafeFS.h" -#include "clang/Tooling/CompilationDatabase.h" #include "clang/Tooling/Core/Replacement.h" #include "llvm/ADT/FunctionExtras.h" -#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" #include <functional> diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp index 43f35232270a..53989ca6ada3 100644 --- a/clang-tools-extra/clangd/CodeComplete.cpp +++ b/clang-tools-extra/clangd/CodeComplete.cpp @@ -21,7 +21,6 @@ #include "AST.h" #include "CodeCompletionStrings.h" #include "Compiler.h" -#include "Diagnostics.h" #include "ExpectedTypes.h" #include "FileDistance.h" #include "FuzzyMatch.h" @@ -31,7 +30,6 @@ #include "Protocol.h" #include "Quality.h" #include "SourceCode.h" -#include "TUScheduler.h" #include "URI.h" #include "index/Index.h" #include "index/Symbol.h" @@ -67,7 +65,6 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Error.h" -#include "llvm/Support/Format.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/ScopedPrinter.h" #include <algorithm> diff --git a/clang-tools-extra/clangd/CodeComplete.h b/clang-tools-extra/clangd/CodeComplete.h index a6117d6d314f..b76dd642943a 100644 --- a/clang-tools-extra/clangd/CodeComplete.h +++ b/clang-tools-extra/clangd/CodeComplete.h @@ -17,22 +17,18 @@ #include "ASTSignals.h" #include "Compiler.h" -#include "Headers.h" #include "Protocol.h" #include "Quality.h" #include "index/Index.h" #include "index/Symbol.h" #include "index/SymbolOrigin.h" -#include "support/Logger.h" #include "support/Markup.h" #include "support/Path.h" #include "clang/Sema/CodeCompleteConsumer.h" #include "clang/Sema/CodeCompleteOptions.h" -#include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/Error.h" #include <functional> #include <future> diff --git a/clang-tools-extra/clangd/CodeCompletionStrings.cpp b/clang-tools-extra/clangd/CodeCompletionStrings.cpp index 8205c88a5b66..1832ee14f2d8 100644 --- a/clang-tools-extra/clangd/CodeCompletionStrings.cpp +++ b/clang-tools-extra/clangd/CodeCompletionStrings.cpp @@ -8,7 +8,6 @@ #include "CodeCompletionStrings.h" #include "clang/AST/ASTContext.h" -#include "clang/AST/DeclObjC.h" #include "clang/AST/RawCommentList.h" #include "clang/Basic/SourceManager.h" #include "clang/Sema/CodeCompleteConsumer.h" diff --git a/clang-tools-extra/clangd/CollectMacros.cpp b/clang-tools-extra/clangd/CollectMacros.cpp index 9bcc3c199541..687f86e0a77e 100644 --- a/clang-tools-extra/clangd/CollectMacros.cpp +++ b/clang-tools-extra/clangd/CollectMacros.cpp @@ -7,8 +7,8 @@ //===----------------------------------------------------------------------===// #include "CollectMacros.h" +#include "AST.h" #include "clang/Basic/SourceLocation.h" -#include "clang/Lex/Lexer.h" namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/CollectMacros.h b/clang-tools-extra/clangd/CollectMacros.h index f8df9f9a20cc..9d7b478f1c3c 100644 --- a/clang-tools-extra/clangd/CollectMacros.h +++ b/clang-tools-extra/clangd/CollectMacros.h @@ -9,11 +9,9 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_COLLECTMACROS_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_COLLECTMACROS_H -#include "AST.h" #include "Protocol.h" #include "SourceCode.h" #include "index/SymbolID.h" -#include "clang/Basic/IdentifierTable.h" #include "clang/Lex/PPCallbacks.h" #include "llvm/ADT/DenseMap.h" #include <string> diff --git a/clang-tools-extra/clangd/CompileCommands.cpp b/clang-tools-extra/clangd/CompileCommands.cpp index f3103b21530c..491b71379353 100644 --- a/clang-tools-extra/clangd/CompileCommands.cpp +++ b/clang-tools-extra/clangd/CompileCommands.cpp @@ -12,9 +12,9 @@ #include "support/Trace.h" #include "clang/Driver/Driver.h" #include "clang/Driver/Options.h" -#include "clang/Driver/ToolChain.h" #include "clang/Frontend/CompilerInvocation.h" #include "clang/Tooling/ArgumentsAdjusters.h" +#include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" diff --git a/clang-tools-extra/clangd/CompileCommands.h b/clang-tools-extra/clangd/CompileCommands.h index c6b338297385..1cf30b7ae55d 100644 --- a/clang-tools-extra/clangd/CompileCommands.h +++ b/clang-tools-extra/clangd/CompileCommands.h @@ -10,7 +10,6 @@ #include "support/Threading.h" #include "clang/Tooling/ArgumentsAdjusters.h" -#include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include <deque> diff --git a/clang-tools-extra/clangd/Compiler.cpp b/clang-tools-extra/clangd/Compiler.cpp index cdc29198d434..5779c627bc92 100644 --- a/clang-tools-extra/clangd/Compiler.cpp +++ b/clang-tools-extra/clangd/Compiler.cpp @@ -13,8 +13,6 @@ #include "clang/Lex/PreprocessorOptions.h" #include "clang/Serialization/PCHContainerOperations.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/Format.h" -#include "llvm/Support/FormatVariadic.h" namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/Compiler.h b/clang-tools-extra/clangd/Compiler.h index 67b92c564550..ca856a8bde9a 100644 --- a/clang-tools-extra/clangd/Compiler.h +++ b/clang-tools-extra/clangd/Compiler.h @@ -16,7 +16,6 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_COMPILER_H #include "FeatureModule.h" -#include "GlobalCompilationDatabase.h" #include "TidyProvider.h" #include "index/Index.h" #include "support/ThreadsafeFS.h" diff --git a/clang-tools-extra/clangd/ConfigCompile.cpp b/clang-tools-extra/clangd/ConfigCompile.cpp index 268f214639b9..4438a29d5608 100644 --- a/clang-tools-extra/clangd/ConfigCompile.cpp +++ b/clang-tools-extra/clangd/ConfigCompile.cpp @@ -38,10 +38,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringSwitch.h" -#include "llvm/Support/Error.h" #include "llvm/Support/FileSystem.h" -#include "llvm/Support/Format.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/Path.h" #include "llvm/Support/Regex.h" diff --git a/clang-tools-extra/clangd/ConfigFragment.h b/clang-tools-extra/clangd/ConfigFragment.h index 0be906036c87..cbaf6deb69de 100644 --- a/clang-tools-extra/clangd/ConfigFragment.h +++ b/clang-tools-extra/clangd/ConfigFragment.h @@ -34,8 +34,6 @@ #include "ConfigProvider.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Error.h" #include "llvm/Support/SMLoc.h" #include "llvm/Support/SourceMgr.h" #include <string> diff --git a/clang-tools-extra/clangd/ConfigProvider.cpp b/clang-tools-extra/clangd/ConfigProvider.cpp index 2b8e406b60d5..c3f48ac44d14 100644 --- a/clang-tools-extra/clangd/ConfigProvider.cpp +++ b/clang-tools-extra/clangd/ConfigProvider.cpp @@ -14,7 +14,6 @@ #include "support/ThreadsafeFS.h" #include "support/Trace.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Path.h" diff --git a/clang-tools-extra/clangd/ConfigProvider.h b/clang-tools-extra/clangd/ConfigProvider.h index 428438b67f14..f268edb1df2a 100644 --- a/clang-tools-extra/clangd/ConfigProvider.h +++ b/clang-tools-extra/clangd/ConfigProvider.h @@ -17,9 +17,7 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CONFIGPROVIDER_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CONFIGPROVIDER_H -#include "llvm/ADT/FunctionExtras.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/SMLoc.h" #include "llvm/Support/SourceMgr.h" #include <chrono> #include <string> diff --git a/clang-tools-extra/clangd/ConfigYAML.cpp b/clang-tools-extra/clangd/ConfigYAML.cpp index 9015de26c91f..9e4a4e0792df 100644 --- a/clang-tools-extra/clangd/ConfigYAML.cpp +++ b/clang-tools-extra/clangd/ConfigYAML.cpp @@ -8,6 +8,7 @@ #include "ConfigFragment.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallSet.h" +#include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/SourceMgr.h" diff --git a/clang-tools-extra/clangd/Diagnostics.cpp b/clang-tools-extra/clangd/Diagnostics.cpp index 40eab3f64742..da9167462d68 100644 --- a/clang-tools-extra/clangd/Diagnostics.cpp +++ b/clang-tools-extra/clangd/Diagnostics.cpp @@ -12,10 +12,9 @@ #include "Protocol.h" #include "SourceCode.h" #include "support/Logger.h" -#include "clang/Basic/AllDiagnostics.h" +#include "clang/Basic/AllDiagnostics.h" // IWYU pragma: keep #include "clang/Basic/Diagnostic.h" #include "clang/Basic/DiagnosticIDs.h" -#include "clang/Basic/FileManager.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" @@ -29,10 +28,7 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Twine.h" -#include "llvm/Support/Capacity.h" #include "llvm/Support/Path.h" -#include "llvm/Support/ScopedPrinter.h" -#include "llvm/Support/Signals.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> #include <cstddef> diff --git a/clang-tools-extra/clangd/Diagnostics.h b/clang-tools-extra/clangd/Diagnostics.h index 718a5583a36d..0c8af97e6695 100644 --- a/clang-tools-extra/clangd/Diagnostics.h +++ b/clang-tools-extra/clangd/Diagnostics.h @@ -10,15 +10,12 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DIAGNOSTICS_H #include "Protocol.h" -#include "support/Path.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringSet.h" #include "llvm/Support/JSON.h" diff --git a/clang-tools-extra/clangd/DraftStore.cpp b/clang-tools-extra/clangd/DraftStore.cpp index e040d1ee93d6..55b4ec59c8e8 100644 --- a/clang-tools-extra/clangd/DraftStore.cpp +++ b/clang-tools-extra/clangd/DraftStore.cpp @@ -7,10 +7,8 @@ //===----------------------------------------------------------------------===// #include "DraftStore.h" -#include "SourceCode.h" #include "support/Logger.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Support/Errc.h" #include "llvm/Support/VirtualFileSystem.h" #include <memory> diff --git a/clang-tools-extra/clangd/DraftStore.h b/clang-tools-extra/clangd/DraftStore.h index 6b50b23995a0..0bc860718fc7 100644 --- a/clang-tools-extra/clangd/DraftStore.h +++ b/clang-tools-extra/clangd/DraftStore.h @@ -9,7 +9,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_DRAFTSTORE_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DRAFTSTORE_H -#include "Protocol.h" #include "support/Path.h" #include "clang/Basic/LLVM.h" #include "llvm/ADT/StringMap.h" diff --git a/clang-tools-extra/clangd/DumpAST.cpp b/clang-tools-extra/clangd/DumpAST.cpp index 22bad6f91514..4c36de88aea1 100644 --- a/clang-tools-extra/clangd/DumpAST.cpp +++ b/clang-tools-extra/clangd/DumpAST.cpp @@ -13,7 +13,6 @@ #include "clang/AST/ASTTypeTraits.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" -#include "clang/AST/ExternalASTSource.h" #include "clang/AST/NestedNameSpecifier.h" #include "clang/AST/PrettyPrinter.h" #include "clang/AST/RecursiveASTVisitor.h" diff --git a/clang-tools-extra/clangd/ExpectedTypes.cpp b/clang-tools-extra/clangd/ExpectedTypes.cpp index 01a08c8589c1..100aa96e26cc 100644 --- a/clang-tools-extra/clangd/ExpectedTypes.cpp +++ b/clang-tools-extra/clangd/ExpectedTypes.cpp @@ -13,7 +13,6 @@ #include "clang/Index/USRGeneration.h" #include "clang/Sema/CodeCompleteConsumer.h" #include "llvm/ADT/None.h" -#include "llvm/ADT/STLExtras.h" namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/FeatureModule.h b/clang-tools-extra/clangd/FeatureModule.h index 82c9134f9272..8f07b1841267 100644 --- a/clang-tools-extra/clangd/FeatureModule.h +++ b/clang-tools-extra/clangd/FeatureModule.h @@ -13,7 +13,6 @@ #include "support/Threading.h" #include "clang/Basic/Diagnostic.h" #include "llvm/ADT/FunctionExtras.h" -#include "llvm/ADT/StringRef.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/JSON.h" #include <memory> diff --git a/clang-tools-extra/clangd/FileDistance.cpp b/clang-tools-extra/clangd/FileDistance.cpp index e1cead329189..cf10d158f08c 100644 --- a/clang-tools-extra/clangd/FileDistance.cpp +++ b/clang-tools-extra/clangd/FileDistance.cpp @@ -31,8 +31,10 @@ //===-------------------------------------------------------------------------// #include "FileDistance.h" +#include "URI.h" #include "support/Logger.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/Support/Path.h" #include <queue> namespace clang { diff --git a/clang-tools-extra/clangd/FileDistance.h b/clang-tools-extra/clangd/FileDistance.h index 88bb30c14270..a6c635202d9d 100644 --- a/clang-tools-extra/clangd/FileDistance.h +++ b/clang-tools-extra/clangd/FileDistance.h @@ -39,15 +39,10 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FILEDISTANCE_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FILEDISTANCE_H -#include "URI.h" +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/DenseMapInfo.h" -#include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/Path.h" -#include "llvm/Support/StringSaver.h" #include <memory> namespace clang { diff --git a/clang-tools-extra/clangd/FindSymbols.cpp b/clang-tools-extra/clangd/FindSymbols.cpp index 75961d3a6ea1..2a150e4d854f 100644 --- a/clang-tools-extra/clangd/FindSymbols.cpp +++ b/clang-tools-extra/clangd/FindSymbols.cpp @@ -15,16 +15,11 @@ #include "index/Index.h" #include "support/Logger.h" #include "clang/AST/DeclTemplate.h" -#include "clang/Index/IndexDataConsumer.h" #include "clang/Index/IndexSymbol.h" -#include "clang/Index/IndexingAction.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/FormatVariadic.h" -#include "llvm/Support/Path.h" -#include "llvm/Support/ScopedPrinter.h" #include <limits> #include <tuple> diff --git a/clang-tools-extra/clangd/FindTarget.cpp b/clang-tools-extra/clangd/FindTarget.cpp index 1b7b7de4f904..404e852e179c 100644 --- a/clang-tools-extra/clangd/FindTarget.cpp +++ b/clang-tools-extra/clangd/FindTarget.cpp @@ -31,7 +31,6 @@ #include "clang/AST/TypeLocVisitor.h" #include "clang/AST/TypeVisitor.h" #include "clang/Basic/LangOptions.h" -#include "clang/Basic/OperatorKinds.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/Specifiers.h" diff --git a/clang-tools-extra/clangd/FindTarget.h b/clang-tools-extra/clangd/FindTarget.h index 756fe1d6458f..b41c54709510 100644 --- a/clang-tools-extra/clangd/FindTarget.h +++ b/clang-tools-extra/clangd/FindTarget.h @@ -27,9 +27,6 @@ #include "clang/AST/NestedNameSpecifier.h" #include "clang/AST/Stmt.h" #include "clang/Basic/SourceLocation.h" -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/raw_ostream.h" diff --git a/clang-tools-extra/clangd/Format.cpp b/clang-tools-extra/clangd/Format.cpp index 3963bc21d403..adf9cfd39cb6 100644 --- a/clang-tools-extra/clangd/Format.cpp +++ b/clang-tools-extra/clangd/Format.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "Format.h" #include "support/Logger.h" -#include "clang/Basic/FileManager.h" #include "clang/Basic/SourceManager.h" #include "clang/Format/Format.h" #include "clang/Lex/Lexer.h" diff --git a/clang-tools-extra/clangd/Format.h b/clang-tools-extra/clangd/Format.h index 6cb9b59f866f..b048f8b2c29d 100644 --- a/clang-tools-extra/clangd/Format.h +++ b/clang-tools-extra/clangd/Format.h @@ -13,7 +13,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FORMAT_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FORMAT_H -#include "Protocol.h" #include "clang/Format/Format.h" #include "clang/Tooling/Core/Replacement.h" #include "llvm/ADT/StringRef.h" diff --git a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp index 85b0826e6d8b..ce31f366cf17 100644 --- a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp +++ b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp @@ -14,7 +14,6 @@ #include "support/Path.h" #include "support/Threading.h" #include "support/ThreadsafeFS.h" -#include "clang/Frontend/CompilerInvocation.h" #include "clang/Tooling/ArgumentsAdjusters.h" #include "clang/Tooling/CompilationDatabase.h" #include "clang/Tooling/CompilationDatabasePluginRegistry.h" @@ -26,10 +25,7 @@ #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringMap.h" -#include "llvm/Support/FileSystem.h" -#include "llvm/Support/FileUtilities.h" #include "llvm/Support/Path.h" -#include "llvm/Support/Program.h" #include "llvm/Support/VirtualFileSystem.h" #include <atomic> #include <chrono> diff --git a/clang-tools-extra/clangd/GlobalCompilationDatabase.h b/clang-tools-extra/clangd/GlobalCompilationDatabase.h index 4a41c6963a59..e71e4368f06b 100644 --- a/clang-tools-extra/clangd/GlobalCompilationDatabase.h +++ b/clang-tools-extra/clangd/GlobalCompilationDatabase.h @@ -9,9 +9,9 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_GLOBALCOMPILATIONDATABASE_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_GLOBALCOMPILATIONDATABASE_H -#include "CompileCommands.h" #include "support/Function.h" #include "support/Path.h" +#include "support/Threading.h" #include "support/ThreadsafeFS.h" #include "clang/Tooling/ArgumentsAdjusters.h" #include "clang/Tooling/CompilationDatabase.h" diff --git a/clang-tools-extra/clangd/Headers.cpp b/clang-tools-extra/clangd/Headers.cpp index da6f51738d83..a278ae97f94a 100644 --- a/clang-tools-extra/clangd/Headers.cpp +++ b/clang-tools-extra/clangd/Headers.cpp @@ -7,15 +7,11 @@ //===----------------------------------------------------------------------===// #include "Headers.h" -#include "Compiler.h" #include "Preamble.h" #include "SourceCode.h" -#include "support/Logger.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Frontend/CompilerInstance.h" -#include "clang/Frontend/CompilerInvocation.h" -#include "clang/Frontend/FrontendActions.h" #include "clang/Lex/HeaderSearch.h" #include "clang/Lex/PPCallbacks.h" #include "clang/Lex/Preprocessor.h" diff --git a/clang-tools-extra/clangd/Headers.h b/clang-tools-extra/clangd/Headers.h index ce04d3dbd462..ed493b892073 100644 --- a/clang-tools-extra/clangd/Headers.h +++ b/clang-tools-extra/clangd/Headers.h @@ -12,14 +12,12 @@ #include "Protocol.h" #include "SourceCode.h" #include "index/Symbol.h" -#include "support/Logger.h" #include "support/Path.h" #include "clang/Basic/FileEntry.h" #include "clang/Basic/TokenKinds.h" #include "clang/Format/Format.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Lex/HeaderSearch.h" -#include "clang/Lex/PPCallbacks.h" #include "clang/Lex/Preprocessor.h" #include "clang/Tooling/Inclusions/HeaderIncludes.h" #include "clang/Tooling/Inclusions/StandardLibrary.h" @@ -29,7 +27,6 @@ #include "llvm/ADT/StringSet.h" #include "llvm/Support/Error.h" #include "llvm/Support/FileSystem/UniqueID.h" -#include "llvm/Support/VirtualFileSystem.h" #include <string> namespace clang { diff --git a/clang-tools-extra/clangd/HeuristicResolver.h b/clang-tools-extra/clangd/HeuristicResolver.h index 7f02636bfeed..26a5bc334c2c 100644 --- a/clang-tools-extra/clangd/HeuristicResolver.h +++ b/clang-tools-extra/clangd/HeuristicResolver.h @@ -10,7 +10,6 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_HEURISTICRESOLVER_H #include "clang/AST/Decl.h" -#include "llvm/ADT/STLExtras.h" #include <vector> namespace clang { diff --git a/clang-tools-extra/clangd/Hover.cpp b/clang-tools-extra/clangd/Hover.cpp index 8b2201841140..fcf3af756184 100644 --- a/clang-tools-extra/clangd/Hover.cpp +++ b/clang-tools-extra/clangd/Hover.cpp @@ -16,7 +16,6 @@ #include "Selection.h" #include "SourceCode.h" #include "index/SymbolCollector.h" -#include "support/Logger.h" #include "support/Markup.h" #include "clang/AST/ASTContext.h" #include "clang/AST/ASTDiagnostic.h" @@ -32,7 +31,6 @@ #include "clang/AST/OperationKinds.h" #include "clang/AST/PrettyPrinter.h" #include "clang/AST/RecordLayout.h" -#include "clang/AST/RecursiveASTVisitor.h" #include "clang/AST/Type.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/Specifiers.h" @@ -46,7 +44,6 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" -#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Format.h" #include "llvm/Support/ScopedPrinter.h" #include "llvm/Support/raw_ostream.h" diff --git a/clang-tools-extra/clangd/IncludeFixer.h b/clang-tools-extra/clangd/IncludeFixer.h index 73b0cd4c03c2..2bb6c229f467 100644 --- a/clang-tools-extra/clangd/IncludeFixer.h +++ b/clang-tools-extra/clangd/IncludeFixer.h @@ -17,8 +17,6 @@ #include "clang/Basic/Diagnostic.h" #include "clang/Basic/SourceLocation.h" #include "clang/Sema/ExternalSemaSource.h" -#include "clang/Sema/Sema.h" -#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/Optional.h" diff --git a/clang-tools-extra/clangd/JSONTransport.cpp b/clang-tools-extra/clangd/JSONTransport.cpp index ecf6c67d8ae4..e04377b1a41d 100644 --- a/clang-tools-extra/clangd/JSONTransport.cpp +++ b/clang-tools-extra/clangd/JSONTransport.cpp @@ -12,9 +12,7 @@ #include "support/Shutdown.h" #include "support/ThreadCrashReporter.h" #include "llvm/ADT/SmallString.h" -#include "llvm/Support/Errno.h" #include "llvm/Support/Error.h" -#include "llvm/Support/Threading.h" #include <system_error> namespace clang { diff --git a/clang-tools-extra/clangd/ParsedAST.cpp b/clang-tools-extra/clangd/ParsedAST.cpp index 199cad8dde44..c2239722737a 100644 --- a/clang-tools-extra/clangd/ParsedAST.cpp +++ b/clang-tools-extra/clangd/ParsedAST.cpp @@ -10,7 +10,6 @@ #include "../clang-tidy/ClangTidyCheck.h" #include "../clang-tidy/ClangTidyDiagnosticConsumer.h" #include "../clang-tidy/ClangTidyModuleRegistry.h" -#include "../clang-tidy/NoLintDirectiveHandler.h" #include "AST.h" #include "Compiler.h" #include "Config.h" @@ -47,7 +46,6 @@ #include "clang/Tooling/Syntax/Tokens.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include <algorithm> diff --git a/clang-tools-extra/clangd/ParsedAST.h b/clang-tools-extra/clangd/ParsedAST.h index 43f3fdda7227..72ba2a9938c2 100644 --- a/clang-tools-extra/clangd/ParsedAST.h +++ b/clang-tools-extra/clangd/ParsedAST.h @@ -26,14 +26,10 @@ #include "Headers.h" #include "Preamble.h" #include "index/CanonicalIncludes.h" -#include "support/Path.h" #include "clang/Frontend/FrontendAction.h" -#include "clang/Frontend/PrecompiledPreamble.h" #include "clang/Lex/Preprocessor.h" -#include "clang/Tooling/CompilationDatabase.h" #include "clang/Tooling/Syntax/Tokens.h" #include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" #include <memory> diff --git a/clang-tools-extra/clangd/PathMapping.cpp b/clang-tools-extra/clangd/PathMapping.cpp index 882e3fba5081..094b0b925a8f 100644 --- a/clang-tools-extra/clangd/PathMapping.cpp +++ b/clang-tools-extra/clangd/PathMapping.cpp @@ -10,8 +10,6 @@ #include "URI.h" #include "support/Logger.h" #include "llvm/ADT/None.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Errno.h" #include "llvm/Support/Error.h" #include "llvm/Support/Path.h" #include <algorithm> diff --git a/clang-tools-extra/clangd/Preamble.cpp b/clang-tools-extra/clangd/Preamble.cpp index f3328df3f51f..ea518f099689 100644 --- a/clang-tools-extra/clangd/Preamble.cpp +++ b/clang-tools-extra/clangd/Preamble.cpp @@ -31,15 +31,11 @@ #include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/None.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringSet.h" #include "llvm/Support/Error.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/FormatVariadic.h" diff --git a/clang-tools-extra/clangd/Protocol.cpp b/clang-tools-extra/clangd/Protocol.cpp index 4dee1373a149..0144d1632026 100644 --- a/clang-tools-extra/clangd/Protocol.cpp +++ b/clang-tools-extra/clangd/Protocol.cpp @@ -15,12 +15,8 @@ #include "support/Logger.h" #include "clang/Basic/LLVM.h" #include "clang/Index/IndexSymbol.h" -#include "llvm/ADT/Hashing.h" -#include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/Format.h" -#include "llvm/Support/FormatVariadic.h" #include "llvm/Support/JSON.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" diff --git a/clang-tools-extra/clangd/Quality.cpp b/clang-tools-extra/clangd/Quality.cpp index 900db4913f80..3546d976c5b8 100644 --- a/clang-tools-extra/clangd/Quality.cpp +++ b/clang-tools-extra/clangd/Quality.cpp @@ -8,22 +8,18 @@ #include "Quality.h" #include "AST.h" +#include "ASTSignals.h" #include "CompletionModel.h" #include "FileDistance.h" #include "SourceCode.h" -#include "URI.h" #include "index/Symbol.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/DeclVisitor.h" -#include "clang/Basic/CharInfo.h" #include "clang/Basic/SourceManager.h" #include "clang/Sema/CodeCompleteConsumer.h" -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" #include "llvm/Support/FormatVariadic.h" diff --git a/clang-tools-extra/clangd/Quality.h b/clang-tools-extra/clangd/Quality.h index 08a8981865de..88235964a768 100644 --- a/clang-tools-extra/clangd/Quality.h +++ b/clang-tools-extra/clangd/Quality.h @@ -27,11 +27,8 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_QUALITY_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_QUALITY_H -#include "ExpectedTypes.h" #include "FileDistance.h" -#include "TUScheduler.h" #include "clang/Sema/CodeCompleteConsumer.h" -#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" #include <algorithm> @@ -46,7 +43,7 @@ namespace clang { class CodeCompletionResult; namespace clangd { - +struct ASTSignals; struct Symbol; class URIDistance; diff --git a/clang-tools-extra/clangd/QueryDriverDatabase.cpp b/clang-tools-extra/clangd/QueryDriverDatabase.cpp index 0daa0c5cd0be..477087323c7d 100644 --- a/clang-tools-extra/clangd/QueryDriverDatabase.cpp +++ b/clang-tools-extra/clangd/QueryDriverDatabase.cpp @@ -29,6 +29,7 @@ // execution, this mechanism is not used by default and only executes binaries // in the paths that are explicitly included by the user. +#include "CompileCommands.h" #include "GlobalCompilationDatabase.h" #include "support/Logger.h" #include "support/Path.h" diff --git a/clang-tools-extra/clangd/RIFF.h b/clang-tools-extra/clangd/RIFF.h index 96d8ab5463d3..0e1dfd880a4e 100644 --- a/clang-tools-extra/clangd/RIFF.h +++ b/clang-tools-extra/clangd/RIFF.h @@ -31,7 +31,6 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_RIFF_H #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" -#include "llvm/Support/ScopedPrinter.h" #include <array> namespace clang { diff --git a/clang-tools-extra/clangd/SemanticHighlighting.cpp b/clang-tools-extra/clangd/SemanticHighlighting.cpp index 796efedcc399..492763cd9923 100644 --- a/clang-tools-extra/clangd/SemanticHighlighting.cpp +++ b/clang-tools-extra/clangd/SemanticHighlighting.cpp @@ -30,7 +30,6 @@ #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Base64.h" #include "llvm/Support/Casting.h" #include <algorithm> diff --git a/clang-tools-extra/clangd/SemanticSelection.cpp b/clang-tools-extra/clangd/SemanticSelection.cpp index 0cb66814f31b..2bead7af2d86 100644 --- a/clang-tools-extra/clangd/SemanticSelection.cpp +++ b/clang-tools-extra/clangd/SemanticSelection.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "SemanticSelection.h" -#include "FindSymbols.h" #include "ParsedAST.h" #include "Protocol.h" #include "Selection.h" @@ -15,7 +14,6 @@ #include "clang/AST/DeclBase.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" -#include "clang/Basic/TokenKinds.h" #include "clang/Tooling/Syntax/BuildTree.h" #include "clang/Tooling/Syntax/Nodes.h" #include "clang/Tooling/Syntax/Tree.h" diff --git a/clang-tools-extra/clangd/SourceCode.cpp b/clang-tools-extra/clangd/SourceCode.cpp index d4a38a56e610..68594c21eccb 100644 --- a/clang-tools-extra/clangd/SourceCode.cpp +++ b/clang-tools-extra/clangd/SourceCode.cpp @@ -10,11 +10,8 @@ #include "FuzzyMatch.h" #include "Preamble.h" #include "Protocol.h" -#include "refactor/Tweak.h" #include "support/Context.h" #include "support/Logger.h" -#include "support/Threading.h" -#include "clang/AST/ASTContext.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" @@ -40,7 +37,6 @@ #include "llvm/Support/LineIterator.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" -#include "llvm/Support/SHA1.h" #include "llvm/Support/VirtualFileSystem.h" #include "llvm/Support/xxhash.h" #include <algorithm> diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp index dfabdb64fd58..37baf9d3d862 100644 --- a/clang-tools-extra/clangd/TUScheduler.cpp +++ b/clang-tools-extra/clangd/TUScheduler.cpp @@ -47,6 +47,7 @@ // requests will receive latest build preamble, which might possibly be stale. #include "TUScheduler.h" +#include "CompileCommands.h" #include "Compiler.h" #include "Diagnostics.h" #include "GlobalCompilationDatabase.h" diff --git a/clang-tools-extra/clangd/TUScheduler.h b/clang-tools-extra/clangd/TUScheduler.h index 379bddb66c17..ceb7ea0f0239 100644 --- a/clang-tools-extra/clangd/TUScheduler.h +++ b/clang-tools-extra/clangd/TUScheduler.h @@ -19,7 +19,6 @@ #include "support/Path.h" #include "support/Threading.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include <chrono> diff --git a/clang-tools-extra/clangd/TidyProvider.cpp b/clang-tools-extra/clangd/TidyProvider.cpp index eea5b062b849..0f0b152be474 100644 --- a/clang-tools-extra/clangd/TidyProvider.cpp +++ b/clang-tools-extra/clangd/TidyProvider.cpp @@ -18,10 +18,8 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringSet.h" #include "llvm/Support/Allocator.h" -#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Process.h" #include "llvm/Support/SourceMgr.h" -#include "llvm/Support/VirtualFileSystem.h" #include <memory> namespace clang { diff --git a/clang-tools-extra/clangd/TidyProvider.h b/clang-tools-extra/clangd/TidyProvider.h index b295a9b05eff..2f31366e1c9b 100644 --- a/clang-tools-extra/clangd/TidyProvider.h +++ b/clang-tools-extra/clangd/TidyProvider.h @@ -12,7 +12,6 @@ #include "../clang-tidy/ClangTidyOptions.h" #include "support/ThreadsafeFS.h" #include "llvm/ADT/FunctionExtras.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" namespace clang { diff --git a/clang-tools-extra/clangd/URI.cpp b/clang-tools-extra/clangd/URI.cpp index 80e3a1017312..c94053cadd2a 100644 --- a/clang-tools-extra/clangd/URI.cpp +++ b/clang-tools-extra/clangd/URI.cpp @@ -11,8 +11,6 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/Error.h" -#include "llvm/Support/Format.h" -#include "llvm/Support/FormatVariadic.h" #include "llvm/Support/Path.h" #include <algorithm> diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index be1361f8bd27..83175a8c721c 100644 --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "XRefs.h" #include "AST.h" -#include "CodeCompletionStrings.h" #include "FindSymbols.h" #include "FindTarget.h" #include "ParsedAST.h" @@ -31,13 +30,11 @@ #include "clang/AST/DeclTemplate.h" #include "clang/AST/DeclVisitor.h" #include "clang/AST/ExprCXX.h" -#include "clang/AST/ExternalASTSource.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/AST/Stmt.h" #include "clang/AST/StmtCXX.h" #include "clang/AST/StmtVisitor.h" #include "clang/AST/Type.h" -#include "clang/Basic/CharInfo.h" #include "clang/Basic/LLVM.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceLocation.h" @@ -50,16 +47,13 @@ #include "clang/Index/USRGeneration.h" #include "clang/Tooling/Syntax/Tokens.h" #include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/MapVector.h" #include "llvm/ADT/None.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/SmallSet.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Error.h" -#include "llvm/Support/MathExtras.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" diff --git a/clang-tools-extra/clangd/XRefs.h b/clang-tools-extra/clangd/XRefs.h index 71feb82eda19..1fa21feae8d5 100644 --- a/clang-tools-extra/clangd/XRefs.h +++ b/clang-tools-extra/clangd/XRefs.h @@ -17,12 +17,8 @@ #include "SourceCode.h" #include "index/Index.h" #include "index/SymbolID.h" -#include "index/SymbolLocation.h" #include "support/Path.h" #include "clang/AST/ASTTypeTraits.h" -#include "clang/AST/Type.h" -#include "clang/Format/Format.h" -#include "clang/Index/IndexSymbol.h" #include "llvm/ADT/Optional.h" #include "llvm/Support/raw_ostream.h" #include <vector> diff --git a/clang-tools-extra/clangd/index/Background.cpp b/clang-tools-extra/clangd/index/Background.cpp index a6ee1d980e04..71860a3a4bcd 100644 --- a/clang-tools-extra/clangd/index/Background.cpp +++ b/clang-tools-extra/clangd/index/Background.cpp @@ -10,9 +10,7 @@ #include "Compiler.h" #include "Config.h" #include "Headers.h" -#include "ParsedAST.h" #include "SourceCode.h" -#include "Symbol.h" #include "URI.h" #include "index/BackgroundIndexLoader.h" #include "index/FileIndex.h" @@ -22,6 +20,7 @@ #include "index/Ref.h" #include "index/Relation.h" #include "index/Serialization.h" +#include "index/Symbol.h" #include "index/SymbolCollector.h" #include "support/Context.h" #include "support/Logger.h" @@ -31,15 +30,12 @@ #include "support/Trace.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" -#include "clang/Driver/Types.h" +#include "clang/Frontend/FrontendAction.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/Hashing.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringSet.h" #include "llvm/Support/Error.h" #include "llvm/Support/Path.h" #include "llvm/Support/Threading.h" diff --git a/clang-tools-extra/clangd/index/Background.h b/clang-tools-extra/clangd/index/Background.h index 808061b17dff..040ca2d002bc 100644 --- a/clang-tools-extra/clangd/index/Background.h +++ b/clang-tools-extra/clangd/index/Background.h @@ -20,7 +20,6 @@ #include "support/Path.h" #include "support/Threading.h" #include "support/ThreadsafeFS.h" -#include "support/Trace.h" #include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/StringMap.h" #include "llvm/Support/Threading.h" diff --git a/clang-tools-extra/clangd/index/BackgroundIndexLoader.cpp b/clang-tools-extra/clangd/index/BackgroundIndexLoader.cpp index 5645569c9ae1..c09a5c3a3aeb 100644 --- a/clang-tools-extra/clangd/index/BackgroundIndexLoader.cpp +++ b/clang-tools-extra/clangd/index/BackgroundIndexLoader.cpp @@ -11,9 +11,6 @@ #include "index/Background.h" #include "support/Logger.h" #include "support/Path.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringMap.h" #include "llvm/Support/Path.h" #include <string> diff --git a/clang-tools-extra/clangd/index/BackgroundIndexLoader.h b/clang-tools-extra/clangd/index/BackgroundIndexLoader.h index 919e2036f060..81033646b6a4 100644 --- a/clang-tools-extra/clangd/index/BackgroundIndexLoader.h +++ b/clang-tools-extra/clangd/index/BackgroundIndexLoader.h @@ -12,11 +12,6 @@ #include "index/Background.h" #include "support/Path.h" #include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/VirtualFileSystem.h" #include <memory> #include <vector> diff --git a/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp b/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp index 26934daf00a7..1de118993a11 100644 --- a/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp +++ b/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp @@ -11,10 +11,7 @@ #include "support/Logger.h" #include "support/Path.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/SmallString.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include "llvm/Support/FileSystem.h" diff --git a/clang-tools-extra/clangd/index/BackgroundRebuild.cpp b/clang-tools-extra/clangd/index/BackgroundRebuild.cpp index 2aa5fa9ca812..79383be012f8 100644 --- a/clang-tools-extra/clangd/index/BackgroundRebuild.cpp +++ b/clang-tools-extra/clangd/index/BackgroundRebuild.cpp @@ -7,33 +7,9 @@ //===----------------------------------------------------------------------===// #include "index/BackgroundRebuild.h" -#include "Compiler.h" -#include "Headers.h" -#include "ParsedAST.h" -#include "SourceCode.h" -#include "Symbol.h" -#include "URI.h" #include "index/FileIndex.h" -#include "index/IndexAction.h" -#include "index/MemIndex.h" -#include "index/Ref.h" -#include "index/Relation.h" -#include "index/Serialization.h" -#include "index/SymbolCollector.h" #include "support/Logger.h" -#include "support/Path.h" -#include "support/Threading.h" #include "support/Trace.h" -#include "clang/Basic/SourceLocation.h" -#include "clang/Basic/SourceManager.h" -#include "llvm/ADT/Hashing.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/ScopeExit.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringSet.h" -#include "llvm/Support/Error.h" -#include "llvm/Support/Threading.h" #include <atomic> #include <chrono> diff --git a/clang-tools-extra/clangd/index/BackgroundRebuild.h b/clang-tools-extra/clangd/index/BackgroundRebuild.h index fa41f5a31324..5ace44cad516 100644 --- a/clang-tools-extra/clangd/index/BackgroundRebuild.h +++ b/clang-tools-extra/clangd/index/BackgroundRebuild.h @@ -16,7 +16,6 @@ #include "index/FileIndex.h" #include "index/Index.h" -#include "llvm/Support/Threading.h" #include <cstddef> namespace clang { diff --git a/clang-tools-extra/clangd/index/CanonicalIncludes.cpp b/clang-tools-extra/clangd/index/CanonicalIncludes.cpp index 3c85a9951e6e..7067f1771b94 100644 --- a/clang-tools-extra/clangd/index/CanonicalIncludes.cpp +++ b/clang-tools-extra/clangd/index/CanonicalIncludes.cpp @@ -8,7 +8,6 @@ #include "CanonicalIncludes.h" #include "Headers.h" -#include "clang/Driver/Types.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Path.h" #include <algorithm> diff --git a/clang-tools-extra/clangd/index/CanonicalIncludes.h b/clang-tools-extra/clangd/index/CanonicalIncludes.h index 7d19e542bedf..747c3f130957 100644 --- a/clang-tools-extra/clangd/index/CanonicalIncludes.h +++ b/clang-tools-extra/clangd/index/CanonicalIncludes.h @@ -22,7 +22,6 @@ #include "clang/Lex/Preprocessor.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/Regex.h" #include <mutex> #include <string> #include <vector> diff --git a/clang-tools-extra/clangd/index/FileIndex.cpp b/clang-tools-extra/clangd/index/FileIndex.cpp index 5f460d8af887..d9b08db5e716 100644 --- a/clang-tools-extra/clangd/index/FileIndex.cpp +++ b/clang-tools-extra/clangd/index/FileIndex.cpp @@ -9,7 +9,6 @@ #include "FileIndex.h" #include "CollectMacros.h" #include "ParsedAST.h" -#include "SymbolCollector.h" #include "index/CanonicalIncludes.h" #include "index/Index.h" #include "index/MemIndex.h" @@ -18,6 +17,7 @@ #include "index/Relation.h" #include "index/Serialization.h" #include "index/Symbol.h" +#include "index/SymbolCollector.h" #include "index/SymbolID.h" #include "index/SymbolOrigin.h" #include "index/dex/Dex.h" diff --git a/clang-tools-extra/clangd/index/FileIndex.h b/clang-tools-extra/clangd/index/FileIndex.h index 99b3e95830eb..4c6f965e7801 100644 --- a/clang-tools-extra/clangd/index/FileIndex.h +++ b/clang-tools-extra/clangd/index/FileIndex.h @@ -16,10 +16,9 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_FILEINDEX_H #include "Headers.h" -#include "Index.h" -#include "MemIndex.h" -#include "Merge.h" #include "index/CanonicalIncludes.h" +#include "index/Index.h" +#include "index/Merge.h" #include "index/Ref.h" #include "index/Relation.h" #include "index/Serialization.h" @@ -27,7 +26,6 @@ #include "support/MemoryTree.h" #include "support/Path.h" #include "clang/Lex/Preprocessor.h" -#include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/StringMap.h" diff --git a/clang-tools-extra/clangd/index/Index.cpp b/clang-tools-extra/clangd/index/Index.cpp index 12f4ff9b82c4..7a0c23287db2 100644 --- a/clang-tools-extra/clangd/index/Index.cpp +++ b/clang-tools-extra/clangd/index/Index.cpp @@ -7,11 +7,7 @@ //===----------------------------------------------------------------------===// #include "Index.h" -#include "support/Logger.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/Error.h" -#include "llvm/Support/raw_ostream.h" #include <limits> namespace clang { diff --git a/clang-tools-extra/clangd/index/Index.h b/clang-tools-extra/clangd/index/Index.h index 04e67bc8df54..d79feaabe457 100644 --- a/clang-tools-extra/clangd/index/Index.h +++ b/clang-tools-extra/clangd/index/Index.h @@ -9,14 +9,13 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_INDEX_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_INDEX_H -#include "Ref.h" -#include "Relation.h" -#include "Symbol.h" -#include "SymbolID.h" +#include "index/Ref.h" +#include "index/Relation.h" +#include "index/Symbol.h" +#include "index/SymbolID.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/FunctionExtras.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/Support/JSON.h" #include <mutex> #include <string> diff --git a/clang-tools-extra/clangd/index/IndexAction.cpp b/clang-tools-extra/clangd/index/IndexAction.cpp index cd0c6dbd5ec6..708df9ad9f3a 100644 --- a/clang-tools-extra/clangd/index/IndexAction.cpp +++ b/clang-tools-extra/clangd/index/IndexAction.cpp @@ -11,17 +11,14 @@ #include "Headers.h" #include "index/Relation.h" #include "index/SymbolOrigin.h" -#include "support/Logger.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTContext.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Frontend/CompilerInstance.h" -#include "clang/Frontend/MultiplexConsumer.h" +#include "clang/Frontend/FrontendActions.h" #include "clang/Index/IndexingAction.h" #include "clang/Index/IndexingOptions.h" -#include "clang/Tooling/Tooling.h" -#include "llvm/ADT/STLExtras.h" #include <cstddef> #include <functional> #include <memory> diff --git a/clang-tools-extra/clangd/index/IndexAction.h b/clang-tools-extra/clangd/index/IndexAction.h index ac8e1430841a..ecd1f63fb00f 100644 --- a/clang-tools-extra/clangd/index/IndexAction.h +++ b/clang-tools-extra/clangd/index/IndexAction.h @@ -9,8 +9,8 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_INDEXACTION_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_INDEXACTION_H #include "Headers.h" -#include "SymbolCollector.h" -#include "clang/Frontend/FrontendActions.h" +#include "index/SymbolCollector.h" +#include "clang/Frontend/FrontendAction.h" namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/index/MemIndex.cpp b/clang-tools-extra/clangd/index/MemIndex.cpp index 9dc8e0aec944..2ca60c99d2a2 100644 --- a/clang-tools-extra/clangd/index/MemIndex.cpp +++ b/clang-tools-extra/clangd/index/MemIndex.cpp @@ -9,9 +9,7 @@ #include "MemIndex.h" #include "FuzzyMatch.h" #include "Quality.h" -#include "support/Logger.h" #include "support/Trace.h" -#include "clang/Index/IndexSymbol.h" namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/index/MemIndex.h b/clang-tools-extra/clangd/index/MemIndex.h index 27e26c6eb17b..fba2c1a7120a 100644 --- a/clang-tools-extra/clangd/index/MemIndex.h +++ b/clang-tools-extra/clangd/index/MemIndex.h @@ -9,7 +9,7 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_MEMINDEX_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_MEMINDEX_H -#include "Index.h" +#include "index/Index.h" #include "llvm/ADT/StringSet.h" #include <mutex> diff --git a/clang-tools-extra/clangd/index/Merge.cpp b/clang-tools-extra/clangd/index/Merge.cpp index 54bb1ee06a05..ddb7865d679c 100644 --- a/clang-tools-extra/clangd/index/Merge.cpp +++ b/clang-tools-extra/clangd/index/Merge.cpp @@ -10,12 +10,8 @@ #include "index/Symbol.h" #include "index/SymbolLocation.h" #include "index/SymbolOrigin.h" -#include "support/Logger.h" #include "support/Trace.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringSet.h" -#include "llvm/Support/raw_ostream.h" #include <algorithm> #include <iterator> diff --git a/clang-tools-extra/clangd/index/Merge.h b/clang-tools-extra/clangd/index/Merge.h index 88125fdbe1eb..b8a562b0df5d 100644 --- a/clang-tools-extra/clangd/index/Merge.h +++ b/clang-tools-extra/clangd/index/Merge.h @@ -9,7 +9,7 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_MERGE_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_MERGE_H -#include "Index.h" +#include "index/Index.h" namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/index/ProjectAware.cpp b/clang-tools-extra/clangd/index/ProjectAware.cpp index 3d5430d2b01d..2c6f8273b35d 100644 --- a/clang-tools-extra/clangd/index/ProjectAware.cpp +++ b/clang-tools-extra/clangd/index/ProjectAware.cpp @@ -9,20 +9,13 @@ #include "ProjectAware.h" #include "Config.h" #include "index/Index.h" -#include "index/MemIndex.h" -#include "index/Merge.h" #include "index/Ref.h" -#include "index/Serialization.h" #include "index/Symbol.h" #include "index/SymbolID.h" -#include "support/Logger.h" #include "support/Threading.h" #include "support/Trace.h" -#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/ErrorHandling.h" #include <map> #include <memory> #include <mutex> diff --git a/clang-tools-extra/clangd/index/Ref.h b/clang-tools-extra/clangd/index/Ref.h index 060d7c971c38..6e383e2ade3d 100644 --- a/clang-tools-extra/clangd/index/Ref.h +++ b/clang-tools-extra/clangd/index/Ref.h @@ -9,10 +9,8 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_REF_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_REF_H -#include "SymbolID.h" -#include "SymbolLocation.h" -#include "clang/Index/IndexSymbol.h" -#include "llvm/ADT/DenseMap.h" +#include "index/SymbolID.h" +#include "index/SymbolLocation.h" #include "llvm/ADT/Hashing.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/StringSaver.h" diff --git a/clang-tools-extra/clangd/index/Relation.h b/clang-tools-extra/clangd/index/Relation.h index b0326ac6eae0..3f5b3a1348f2 100644 --- a/clang-tools-extra/clangd/index/Relation.h +++ b/clang-tools-extra/clangd/index/Relation.h @@ -9,9 +9,7 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H -#include "SymbolID.h" -#include "SymbolLocation.h" -#include "clang/Index/IndexSymbol.h" +#include "index/SymbolID.h" #include "llvm/ADT/iterator_range.h" #include <cstdint> #include <utility> diff --git a/clang-tools-extra/clangd/index/Serialization.cpp b/clang-tools-extra/clangd/index/Serialization.cpp index 8c4b97f6ad28..8ceecb607236 100644 --- a/clang-tools-extra/clangd/index/Serialization.cpp +++ b/clang-tools-extra/clangd/index/Serialization.cpp @@ -9,9 +9,10 @@ #include "Serialization.h" #include "Headers.h" #include "RIFF.h" -#include "SymbolLocation.h" -#include "SymbolOrigin.h" -#include "dex/Dex.h" +#include "index/MemIndex.h" +#include "index/SymbolLocation.h" +#include "index/SymbolOrigin.h" +#include "index/dex/Dex.h" #include "support/Logger.h" #include "support/Trace.h" #include "clang/Tooling/CompilationDatabase.h" diff --git a/clang-tools-extra/clangd/index/Serialization.h b/clang-tools-extra/clangd/index/Serialization.h index 40d8bfda361c..f5492f357f4e 100644 --- a/clang-tools-extra/clangd/index/Serialization.h +++ b/clang-tools-extra/clangd/index/Serialization.h @@ -25,7 +25,7 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SERIALIZATION_H #include "Headers.h" -#include "Index.h" +#include "index/Index.h" #include "index/Symbol.h" #include "clang/Tooling/CompilationDatabase.h" #include "llvm/Support/Error.h" diff --git a/clang-tools-extra/clangd/index/Symbol.h b/clang-tools-extra/clangd/index/Symbol.h index 5768877de895..a8333a8fe135 100644 --- a/clang-tools-extra/clangd/index/Symbol.h +++ b/clang-tools-extra/clangd/index/Symbol.h @@ -9,9 +9,9 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_H -#include "SymbolID.h" -#include "SymbolLocation.h" -#include "SymbolOrigin.h" +#include "index/SymbolID.h" +#include "index/SymbolLocation.h" +#include "index/SymbolOrigin.h" #include "clang/Index/IndexSymbol.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/StringSaver.h" diff --git a/clang-tools-extra/clangd/index/SymbolCollector.cpp b/clang-tools-extra/clangd/index/SymbolCollector.cpp index ec0aa3c6f015..ad970a5be85c 100644 --- a/clang-tools-extra/clangd/index/SymbolCollector.cpp +++ b/clang-tools-extra/clangd/index/SymbolCollector.cpp @@ -8,32 +8,26 @@ #include "SymbolCollector.h" #include "AST.h" -#include "CanonicalIncludes.h" #include "CodeComplete.h" #include "CodeCompletionStrings.h" #include "ExpectedTypes.h" #include "SourceCode.h" -#include "SymbolLocation.h" #include "URI.h" +#include "index/CanonicalIncludes.h" #include "index/Relation.h" #include "index/SymbolID.h" -#include "support/Logger.h" +#include "index/SymbolLocation.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclBase.h" -#include "clang/AST/DeclCXX.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/DeclTemplate.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" -#include "clang/Basic/Specifiers.h" #include "clang/Index/IndexSymbol.h" -#include "clang/Index/IndexingAction.h" -#include "clang/Index/USRGeneration.h" #include "clang/Lex/Preprocessor.h" #include "clang/Tooling/Syntax/Tokens.h" #include "llvm/Support/Casting.h" #include "llvm/Support/FileSystem.h" -#include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" namespace clang { diff --git a/clang-tools-extra/clangd/index/SymbolCollector.h b/clang-tools-extra/clangd/index/SymbolCollector.h index 0be6d2ad6c5b..4e1b563a8831 100644 --- a/clang-tools-extra/clangd/index/SymbolCollector.h +++ b/clang-tools-extra/clangd/index/SymbolCollector.h @@ -8,10 +8,12 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOLCOLLECTOR_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOLCOLLECTOR_H -#include "CanonicalIncludes.h" +#include "index/CanonicalIncludes.h" #include "CollectMacros.h" -#include "Index.h" -#include "SymbolOrigin.h" +#include "index/Ref.h" +#include "index/Relation.h" +#include "index/Symbol.h" +#include "index/SymbolOrigin.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/Basic/SourceLocation.h" @@ -20,7 +22,6 @@ #include "clang/Index/IndexSymbol.h" #include "clang/Sema/CodeCompleteConsumer.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/Support/Regex.h" #include <functional> namespace clang { diff --git a/clang-tools-extra/clangd/index/SymbolID.h b/clang-tools-extra/clangd/index/SymbolID.h index 518c130830d5..989818ef8bd7 100644 --- a/clang-tools-extra/clangd/index/SymbolID.h +++ b/clang-tools-extra/clangd/index/SymbolID.h @@ -9,7 +9,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOLID_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOLID_H -#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" diff --git a/clang-tools-extra/clangd/index/YAMLSerialization.cpp b/clang-tools-extra/clangd/index/YAMLSerialization.cpp index ddab56ea1bbc..6d6db8261b6c 100644 --- a/clang-tools-extra/clangd/index/YAMLSerialization.cpp +++ b/clang-tools-extra/clangd/index/YAMLSerialization.cpp @@ -12,20 +12,17 @@ // //===----------------------------------------------------------------------===// -#include "Index.h" -#include "Relation.h" -#include "Serialization.h" -#include "SymbolLocation.h" -#include "SymbolOrigin.h" -#include "dex/Dex.h" -#include "support/Logger.h" -#include "support/Trace.h" +#include "Headers.h" +#include "index/Ref.h" +#include "index/Relation.h" +#include "index/Serialization.h" +#include "index/Symbol.h" +#include "index/SymbolLocation.h" +#include "index/SymbolOrigin.h" +#include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Allocator.h" -#include "llvm/Support/Errc.h" -#include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/StringSaver.h" #include "llvm/Support/YAMLTraits.h" #include "llvm/Support/raw_ostream.h" diff --git a/clang-tools-extra/clangd/index/dex/Dex.cpp b/clang-tools-extra/clangd/index/dex/Dex.cpp index 7ebd5f685685..6975533c01f0 100644 --- a/clang-tools-extra/clangd/index/dex/Dex.cpp +++ b/clang-tools-extra/clangd/index/dex/Dex.cpp @@ -10,11 +10,14 @@ #include "FileDistance.h" #include "FuzzyMatch.h" #include "Quality.h" +#include "URI.h" #include "index/Index.h" #include "index/dex/Iterator.h" +#include "index/dex/Trigram.h" #include "support/Logger.h" #include "support/Trace.h" #include "llvm/ADT/StringSet.h" +#include "llvm/Support/Path.h" #include "llvm/Support/ScopedPrinter.h" #include <algorithm> #include <queue> diff --git a/clang-tools-extra/clangd/index/dex/Dex.h b/clang-tools-extra/clangd/index/dex/Dex.h index 3153360323d4..f29e7496946c 100644 --- a/clang-tools-extra/clangd/index/dex/Dex.h +++ b/clang-tools-extra/clangd/index/dex/Dex.h @@ -20,14 +20,12 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_DEX_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_DEX_H -#include "Iterator.h" -#include "PostingList.h" -#include "Token.h" -#include "Trigram.h" +#include "index/dex/Iterator.h" #include "index/Index.h" -#include "index/MemIndex.h" #include "index/Relation.h" -#include "index/SymbolCollector.h" +#include "index/dex/PostingList.h" +#include "index/dex/Token.h" +#include "llvm/ADT/StringSet.h" namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/index/dex/Iterator.cpp b/clang-tools-extra/clangd/index/dex/Iterator.cpp index 8b5e5244d311..fd60a1365b0e 100644 --- a/clang-tools-extra/clangd/index/dex/Iterator.cpp +++ b/clang-tools-extra/clangd/index/dex/Iterator.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// #include "Iterator.h" -#include "llvm/Support/Casting.h" +#include "llvm/ADT/STLExtras.h" #include <algorithm> #include <cassert> #include <numeric> diff --git a/clang-tools-extra/clangd/index/dex/Iterator.h b/clang-tools-extra/clangd/index/dex/Iterator.h index 34b42c323efe..85661eed9fdf 100644 --- a/clang-tools-extra/clangd/index/dex/Iterator.h +++ b/clang-tools-extra/clangd/index/dex/Iterator.h @@ -31,7 +31,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_ITERATOR_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_ITERATOR_H -#include "llvm/ADT/ArrayRef.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> #include <memory> diff --git a/clang-tools-extra/clangd/index/dex/PostingList.cpp b/clang-tools-extra/clangd/index/dex/PostingList.cpp index e9e831637efe..2a61297682e4 100644 --- a/clang-tools-extra/clangd/index/dex/PostingList.cpp +++ b/clang-tools-extra/clangd/index/dex/PostingList.cpp @@ -7,10 +7,8 @@ //===----------------------------------------------------------------------===// #include "PostingList.h" -#include "Iterator.h" -#include "Token.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Error.h" +#include "index/dex/Iterator.h" +#include "index/dex/Token.h" #include "llvm/Support/MathExtras.h" namespace clang { @@ -186,7 +184,7 @@ std::vector<Chunk> encodeStream(llvm::ArrayRef<DocID> Documents) { /// the stream is terminated, return None. llvm::Optional<DocID> readVByte(llvm::ArrayRef<uint8_t> &Bytes) { if (Bytes.front() == 0 || Bytes.empty()) - return None; + return llvm::None; DocID Result = 0; bool HasNextByte = true; for (size_t Length = 0; HasNextByte && !Bytes.empty(); ++Length) { diff --git a/clang-tools-extra/clangd/index/dex/Token.h b/clang-tools-extra/clangd/index/dex/Token.h index db367c06ccb1..41ef0d66d168 100644 --- a/clang-tools-extra/clangd/index/dex/Token.h +++ b/clang-tools-extra/clangd/index/dex/Token.h @@ -22,8 +22,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_TOKEN_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_TOKEN_H -#include "index/Index.h" -#include "llvm/ADT/DenseMap.h" #include "llvm/Support/raw_ostream.h" #include <string> #include <vector> diff --git a/clang-tools-extra/clangd/index/dex/Trigram.cpp b/clang-tools-extra/clangd/index/dex/Trigram.cpp index 16bb580179d0..2cf33d551a25 100644 --- a/clang-tools-extra/clangd/index/dex/Trigram.cpp +++ b/clang-tools-extra/clangd/index/dex/Trigram.cpp @@ -8,7 +8,7 @@ #include "Trigram.h" #include "FuzzyMatch.h" -#include "Token.h" +#include "index/dex/Token.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/STLExtras.h" diff --git a/clang-tools-extra/clangd/index/dex/Trigram.h b/clang-tools-extra/clangd/index/dex/Trigram.h index 055116870f44..f931004ebc22 100644 --- a/clang-tools-extra/clangd/index/dex/Trigram.h +++ b/clang-tools-extra/clangd/index/dex/Trigram.h @@ -23,7 +23,7 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_TRIGRAM_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_TRIGRAM_H -#include "Token.h" +#include "index/dex/Token.h" #include "llvm/ADT/bit.h" #include <string> diff --git a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp index 14911daec34c..2615d06bbd2b 100644 --- a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp +++ b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp @@ -14,7 +14,6 @@ #include "index/Index.h" #include "index/Relation.h" #include "index/Serialization.h" -#include "index/dex/Dex.h" #include "index/remote/Client.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/SmallVector.h" diff --git a/clang-tools-extra/clangd/indexer/IndexerMain.cpp b/clang-tools-extra/clangd/indexer/IndexerMain.cpp index 2b3de014f8f7..7393984b984b 100644 --- a/clang-tools-extra/clangd/indexer/IndexerMain.cpp +++ b/clang-tools-extra/clangd/indexer/IndexerMain.cpp @@ -20,7 +20,6 @@ #include "index/SymbolCollector.h" #include "support/Logger.h" #include "clang/Tooling/ArgumentsAdjusters.h" -#include "clang/Tooling/CommonOptionsParser.h" #include "clang/Tooling/Execution.h" #include "clang/Tooling/Tooling.h" #include "llvm/Support/CommandLine.h" diff --git a/clang-tools-extra/clangd/refactor/Rename.h b/clang-tools-extra/clangd/refactor/Rename.h index 03ae4f7f1563..b4cdd1147fb6 100644 --- a/clang-tools-extra/clangd/refactor/Rename.h +++ b/clang-tools-extra/clangd/refactor/Rename.h @@ -11,9 +11,7 @@ #include "Protocol.h" #include "SourceCode.h" -#include "support/Path.h" #include "clang/Basic/LangOptions.h" -#include "clang/Tooling/Core/Replacement.h" #include "llvm/Support/Error.h" namespace clang { diff --git a/clang-tools-extra/clangd/refactor/Tweak.cpp b/clang-tools-extra/clangd/refactor/Tweak.cpp index 33d43278a5da..bd3fbc602e85 100644 --- a/clang-tools-extra/clangd/refactor/Tweak.cpp +++ b/clang-tools-extra/clangd/refactor/Tweak.cpp @@ -11,7 +11,6 @@ #include "index/Index.h" #include "support/Logger.h" #include "support/Path.h" -#include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringMap.h" diff --git a/clang-tools-extra/clangd/refactor/Tweak.h b/clang-tools-extra/clangd/refactor/Tweak.h index 84fbada46014..5e7b77fcba84 100644 --- a/clang-tools-extra/clangd/refactor/Tweak.h +++ b/clang-tools-extra/clangd/refactor/Tweak.h @@ -20,15 +20,12 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_REFACTOR_TWEAK_H #include "ParsedAST.h" -#include "Protocol.h" #include "Selection.h" #include "SourceCode.h" #include "index/Index.h" #include "support/Path.h" #include "clang/Tooling/Core/Replacement.h" -#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include <string> diff --git a/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp b/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp index 2b67034da8d4..a75c4852bf75 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp @@ -8,7 +8,6 @@ #include "AST.h" #include "Config.h" -#include "FindTarget.h" #include "refactor/Tweak.h" #include "support/Logger.h" #include "clang/AST/Decl.h" diff --git a/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp b/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp index ae1ceaf12cb8..9812cfcf3c62 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp @@ -19,25 +19,13 @@ #include "clang/AST/DeclBase.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclTemplate.h" -#include "clang/AST/Expr.h" -#include "clang/AST/ExprCXX.h" #include "clang/AST/NestedNameSpecifier.h" -#include "clang/AST/PrettyPrinter.h" -#include "clang/AST/RecursiveASTVisitor.h" #include "clang/AST/Stmt.h" -#include "clang/AST/TemplateBase.h" -#include "clang/AST/Type.h" -#include "clang/AST/TypeLoc.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TokenKinds.h" -#include "clang/Driver/Types.h" -#include "clang/Index/IndexDataConsumer.h" -#include "clang/Index/IndexSymbol.h" -#include "clang/Index/IndexingAction.h" #include "clang/Lex/Lexer.h" -#include "clang/Lex/Preprocessor.h" #include "clang/Lex/Token.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/Sema.h" @@ -46,14 +34,10 @@ #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Error.h" -#include "llvm/Support/FormatAdapters.h" -#include "llvm/Support/FormatVariadic.h" -#include "llvm/Support/Signals.h" #include "llvm/Support/raw_ostream.h" #include <cstddef> #include <set> diff --git a/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp b/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp index 645b4af36a27..0bbf3274b3a6 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp @@ -25,9 +25,6 @@ #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TokenKinds.h" -#include "clang/Driver/Types.h" -#include "clang/Format/Format.h" -#include "clang/Lex/Lexer.h" #include "clang/Tooling/Core/Replacement.h" #include "clang/Tooling/Syntax/Tokens.h" #include "llvm/ADT/None.h" diff --git a/clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp index a717743ce3a7..28489dcc75a7 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp @@ -7,15 +7,12 @@ //===----------------------------------------------------------------------===// #include "refactor/Tweak.h" -#include "XRefs.h" #include "support/Logger.h" #include "clang/AST/Type.h" #include "clang/AST/TypeLoc.h" #include "clang/Basic/LLVM.h" #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/StringExtras.h" -#include "llvm/Support/Debug.h" #include "llvm/Support/Error.h" #include <AST.h> #include <climits> diff --git a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp index a3e20d66b80b..7bbe0d12dac9 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp @@ -56,13 +56,11 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclBase.h" -#include "clang/AST/DeclTemplate.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/AST/Stmt.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" -#include "clang/Lex/Lexer.h" #include "clang/Tooling/Core/Replacement.h" #include "clang/Tooling/Refactoring/Extract/SourceExtraction.h" #include "llvm/ADT/None.h" @@ -71,7 +69,6 @@ #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/iterator_range.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Error.h" diff --git a/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp index a4db11f1a364..942d7eec6dbd 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp @@ -10,7 +10,6 @@ #include "Selection.h" #include "SourceCode.h" #include "refactor/Tweak.h" -#include "support/Logger.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" @@ -22,7 +21,6 @@ #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Tooling/Core/Replacement.h" -#include "llvm/ADT/None.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" diff --git a/clang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp b/clang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp index 0c50db79d367..1e2d6c31fc45 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp @@ -7,18 +7,14 @@ //===----------------------------------------------------------------------===// #include "ParsedAST.h" -#include "SourceCode.h" #include "refactor/Tweak.h" #include "support/Logger.h" #include "clang/AST/ExprObjC.h" -#include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Tooling/Core/Replacement.h" -#include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/iterator_range.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Error.h" diff --git a/clang-tools-extra/clangd/refactor/tweaks/PopulateSwitch.cpp b/clang-tools-extra/clangd/refactor/tweaks/PopulateSwitch.cpp index 4e2b15b8f22a..a152fb5cfabd 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/PopulateSwitch.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/PopulateSwitch.cpp @@ -33,7 +33,6 @@ #include "AST.h" #include "Selection.h" #include "refactor/Tweak.h" -#include "support/Logger.h" #include "clang/AST/Decl.h" #include "clang/AST/Stmt.h" #include "clang/AST/Type.h" diff --git a/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp b/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp index b0ab3067449b..77fefe87e358 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp @@ -6,21 +6,13 @@ // //===----------------------------------------------------------------------===// #include "ParsedAST.h" -#include "SourceCode.h" #include "refactor/Tweak.h" -#include "support/Logger.h" -#include "clang/AST/ASTContext.h" -#include "clang/AST/RecursiveASTVisitor.h" #include "clang/AST/Stmt.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" -#include "clang/Lex/Lexer.h" #include "clang/Tooling/Core/Replacement.h" -#include "llvm/ADT/None.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/iterator_range.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Error.h" diff --git a/clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp b/clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp index d0394430778c..8df7a448c438 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp @@ -8,7 +8,6 @@ #include "AST.h" #include "FindTarget.h" #include "Selection.h" -#include "SourceCode.h" #include "refactor/Tweak.h" #include "support/Logger.h" #include "clang/AST/Decl.h" @@ -17,8 +16,6 @@ #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Basic/SourceLocation.h" #include "clang/Tooling/Core/Replacement.h" -#include "clang/Tooling/Refactoring/RecursiveSymbolVisitor.h" -#include "llvm/ADT/ScopeExit.h" namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp b/clang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp index f412a2670259..5c829cb34887 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp @@ -10,14 +10,11 @@ #include "refactor/Tweak.h" #include "support/Logger.h" #include "clang/AST/ASTContext.h" -#include "clang/AST/RecursiveASTVisitor.h" #include "clang/AST/Stmt.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" -#include "clang/Lex/Lexer.h" #include "clang/Tooling/Core/Replacement.h" -#include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" diff --git a/clang-tools-extra/clangd/support/FileCache.cpp b/clang-tools-extra/clangd/support/FileCache.cpp index 4c2795015845..ad5f7ea87671 100644 --- a/clang-tools-extra/clangd/support/FileCache.cpp +++ b/clang-tools-extra/clangd/support/FileCache.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "support/FileCache.h" +#include "llvm/ADT/ScopeExit.h" namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/support/FileCache.h b/clang-tools-extra/clangd/support/FileCache.h index ffc5deb7442b..7e28f5b3e463 100644 --- a/clang-tools-extra/clangd/support/FileCache.h +++ b/clang-tools-extra/clangd/support/FileCache.h @@ -11,9 +11,7 @@ #include "Path.h" #include "ThreadsafeFS.h" -#include "llvm/ADT/ScopeExit.h" #include "llvm/Support/Chrono.h" -#include "llvm/Support/VirtualFileSystem.h" #include <mutex> namespace clang { diff --git a/clang-tools-extra/clangd/support/Logger.h b/clang-tools-extra/clangd/support/Logger.h index b0356cb28249..dba33be48f56 100644 --- a/clang-tools-extra/clangd/support/Logger.h +++ b/clang-tools-extra/clangd/support/Logger.h @@ -9,7 +9,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_LOGGER_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_LOGGER_H -#include "llvm/ADT/Twine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Error.h" #include "llvm/Support/FormatAdapters.h" diff --git a/clang-tools-extra/clangd/support/Markup.cpp b/clang-tools-extra/clangd/support/Markup.cpp index 60ad9464b2f6..7f6eb31bcdd3 100644 --- a/clang-tools-extra/clangd/support/Markup.cpp +++ b/clang-tools-extra/clangd/support/Markup.cpp @@ -12,8 +12,6 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Compiler.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/FormatVariadic.h" #include "llvm/Support/raw_ostream.h" #include <cstddef> #include <iterator> diff --git a/clang-tools-extra/clangd/support/MemoryTree.cpp b/clang-tools-extra/clangd/support/MemoryTree.cpp index a495778b9e5b..be4488e85e18 100644 --- a/clang-tools-extra/clangd/support/MemoryTree.cpp +++ b/clang-tools-extra/clangd/support/MemoryTree.cpp @@ -1,6 +1,13 @@ +//===--- MemoryTree.h - A special tree for components and sizes -----------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + #include "support/MemoryTree.h" #include "Trace.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include <cstddef> diff --git a/clang-tools-extra/clangd/support/MemoryTree.h b/clang-tools-extra/clangd/support/MemoryTree.h index 903cd64ebb7c..07935fd814db 100644 --- a/clang-tools-extra/clangd/support/MemoryTree.h +++ b/clang-tools-extra/clangd/support/MemoryTree.h @@ -11,10 +11,8 @@ #include "Trace.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Allocator.h" -#include "llvm/Support/StringSaver.h" #include <cstddef> #include <string> #include <vector> diff --git a/clang-tools-extra/clangd/support/ThreadCrashReporter.cpp b/clang-tools-extra/clangd/support/ThreadCrashReporter.cpp index b0386ba0089d..7e1d6448a0a1 100644 --- a/clang-tools-extra/clangd/support/ThreadCrashReporter.cpp +++ b/clang-tools-extra/clangd/support/ThreadCrashReporter.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "support/ThreadCrashReporter.h" -#include "llvm/Support/Signals.h" #include "llvm/Support/ThreadLocal.h" #include <atomic> diff --git a/clang-tools-extra/clangd/support/Threading.cpp b/clang-tools-extra/clangd/support/Threading.cpp index 4d50776b941d..f7a511d62315 100644 --- a/clang-tools-extra/clangd/support/Threading.cpp +++ b/clang-tools-extra/clangd/support/Threading.cpp @@ -1,7 +1,14 @@ +//===--- Threading.cpp - Abstractions for multithreading ------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + #include "support/Threading.h" #include "support/Trace.h" #include "llvm/ADT/ScopeExit.h" -#include "llvm/Support/FormatVariadic.h" #include "llvm/Support/Threading.h" #include "llvm/Support/thread.h" #include <atomic> diff --git a/clang-tools-extra/clangd/support/ThreadsafeFS.cpp b/clang-tools-extra/clangd/support/ThreadsafeFS.cpp index ae9450f17411..efd7e8cc6079 100644 --- a/clang-tools-extra/clangd/support/ThreadsafeFS.cpp +++ b/clang-tools-extra/clangd/support/ThreadsafeFS.cpp @@ -9,8 +9,6 @@ #include "support/ThreadsafeFS.h" #include "Logger.h" #include "llvm/ADT/None.h" -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Path.h" diff --git a/clang-tools-extra/clangd/support/ThreadsafeFS.h b/clang-tools-extra/clangd/support/ThreadsafeFS.h index ad0dd6425811..b518c03e3696 100644 --- a/clang-tools-extra/clangd/support/ThreadsafeFS.h +++ b/clang-tools-extra/clangd/support/ThreadsafeFS.h @@ -12,7 +12,6 @@ #include "Path.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/None.h" -#include "llvm/ADT/Optional.h" #include "llvm/Support/VirtualFileSystem.h" #include <memory> diff --git a/clang-tools-extra/clangd/support/Trace.cpp b/clang-tools-extra/clangd/support/Trace.cpp index 9cfc58c37733..a2bf2dc5103d 100644 --- a/clang-tools-extra/clangd/support/Trace.cpp +++ b/clang-tools-extra/clangd/support/Trace.cpp @@ -13,7 +13,6 @@ #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Chrono.h" -#include "llvm/Support/FormatProviders.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/Threading.h" #include <atomic> diff --git a/clang-tools-extra/clangd/tool/Check.cpp b/clang-tools-extra/clangd/tool/Check.cpp index bcbcd65b0122..11877926a1f7 100644 --- a/clang-tools-extra/clangd/tool/Check.cpp +++ b/clang-tools-extra/clangd/tool/Check.cpp @@ -26,6 +26,7 @@ #include "ClangdLSPServer.h" #include "CodeComplete.h" +#include "CompileCommands.h" #include "Config.h" #include "GlobalCompilationDatabase.h" #include "Hover.h" @@ -39,13 +40,11 @@ #include "support/ThreadsafeFS.h" #include "support/Trace.h" #include "clang/AST/ASTContext.h" -#include "clang/Basic/DiagnosticIDs.h" #include "clang/Format/Format.h" #include "clang/Frontend/CompilerInvocation.h" #include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/Support/Path.h" namespace clang { diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp index fa3c59de20fa..8bbf0ef4d3f4 100644 --- a/clang-tools-extra/clangd/tool/ClangdMain.cpp +++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -19,9 +19,9 @@ #include "Transport.h" #include "index/Background.h" #include "index/Index.h" +#include "index/MemIndex.h" #include "index/Merge.h" #include "index/ProjectAware.h" -#include "index/Serialization.h" #include "index/remote/Client.h" #include "support/Path.h" #include "support/Shutdown.h" diff --git a/clang-tools-extra/clangd/unittests/ASTSignalsTests.cpp b/clang-tools-extra/clangd/unittests/ASTSignalsTests.cpp index 2d8c1846a8ae..23b4905d1051 100644 --- a/clang-tools-extra/clangd/unittests/ASTSignalsTests.cpp +++ b/clang-tools-extra/clangd/unittests/ASTSignalsTests.cpp @@ -5,9 +5,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -#include "AST.h" -#include "ParsedAST.h" +#include "ASTSignals.h" #include "TestIndex.h" #include "TestTU.h" #include "llvm/ADT/StringRef.h" diff --git a/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp b/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp index 247ddf6ced11..8fdc5be68934 100644 --- a/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp +++ b/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp @@ -3,15 +3,14 @@ #include "Headers.h" #include "SyncAPI.h" #include "TestFS.h" -#include "TestIndex.h" #include "TestTU.h" #include "index/Background.h" #include "index/BackgroundRebuild.h" +#include "index/MemIndex.h" #include "clang/Tooling/ArgumentsAdjusters.h" #include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/ScopedPrinter.h" -#include "llvm/Support/Threading.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include <deque> diff --git a/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp b/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp index b2f3a14f1247..6fa76aa6094b 100644 --- a/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp +++ b/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp @@ -6,21 +6,12 @@ // //===----------------------------------------------------------------------===// #include "Annotations.h" -#include "Compiler.h" -#include "Matchers.h" #include "ParsedAST.h" -#include "SyncAPI.h" #include "TestFS.h" #include "TestTU.h" #include "TestWorkspace.h" #include "XRefs.h" -#include "index/FileIndex.h" -#include "index/SymbolCollector.h" -#include "clang/AST/DeclCXX.h" -#include "clang/AST/DeclTemplate.h" -#include "clang/Index/IndexingAction.h" #include "llvm/Support/Path.h" -#include "llvm/Support/ScopedPrinter.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/ClangdTests.cpp b/clang-tools-extra/clangd/unittests/ClangdTests.cpp index e6a2e377c59d..fa620fda557b 100644 --- a/clang-tools-extra/clangd/unittests/ClangdTests.cpp +++ b/clang-tools-extra/clangd/unittests/ClangdTests.cpp @@ -7,9 +7,9 @@ //===----------------------------------------------------------------------===// #include "Annotations.h" -#include "ClangdLSPServer.h" #include "ClangdServer.h" #include "CodeComplete.h" +#include "CompileCommands.h" #include "ConfigFragment.h" #include "GlobalCompilationDatabase.h" #include "Matchers.h" @@ -17,7 +17,6 @@ #include "TestFS.h" #include "TestTU.h" #include "TidyProvider.h" -#include "URI.h" #include "refactor/Tweak.h" #include "support/MemoryTree.h" #include "support/Path.h" @@ -32,7 +31,6 @@ #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Allocator.h" -#include "llvm/Support/Errc.h" #include "llvm/Support/Error.h" #include "llvm/Support/Path.h" #include "llvm/Support/Regex.h" diff --git a/clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp b/clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp index 991278647cb3..196ed5cea469 100644 --- a/clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp +++ b/clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp @@ -5,12 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// +#include "AST.h" #include "Annotations.h" #include "CollectMacros.h" -#include "Matchers.h" #include "SourceCode.h" #include "TestTU.h" -#include "index/SymbolID.h" #include "clang/Basic/SourceLocation.h" #include "llvm/Support/ScopedPrinter.h" #include "gmock/gmock.h" diff --git a/clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp b/clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp index e2c32aad0110..461218603d0e 100644 --- a/clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp +++ b/clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp @@ -9,6 +9,7 @@ #include "Config.h" #include "ConfigFragment.h" #include "ConfigTesting.h" +#include "Diagnostics.h" #include "Feature.h" #include "TestFS.h" #include "clang/Basic/DiagnosticSema.h" diff --git a/clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp b/clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp index edb458f2a0ed..d4be2e9ad4eb 100644 --- a/clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp +++ b/clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp @@ -13,7 +13,6 @@ #include "llvm/ADT/None.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/SMLoc.h" -#include "llvm/Support/ScopedPrinter.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Testing/Support/SupportHelpers.h" #include "gmock/gmock.h" diff --git a/clang-tools-extra/clangd/unittests/DexTests.cpp b/clang-tools-extra/clangd/unittests/DexTests.cpp index 7e10ea53a43e..17cf8de921d0 100644 --- a/clang-tools-extra/clangd/unittests/DexTests.cpp +++ b/clang-tools-extra/clangd/unittests/DexTests.cpp @@ -6,18 +6,15 @@ // //===----------------------------------------------------------------------===// -#include "FuzzyMatch.h" #include "TestFS.h" #include "TestIndex.h" #include "index/Index.h" -#include "index/Merge.h" #include "index/SymbolID.h" #include "index/dex/Dex.h" #include "index/dex/Iterator.h" #include "index/dex/Token.h" #include "index/dex/Trigram.h" #include "llvm/Support/ScopedPrinter.h" -#include "llvm/Support/raw_ostream.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include <string> diff --git a/clang-tools-extra/clangd/unittests/DraftStoreTests.cpp b/clang-tools-extra/clangd/unittests/DraftStoreTests.cpp index 5375ea4273af..9d202e40113f 100644 --- a/clang-tools-extra/clangd/unittests/DraftStoreTests.cpp +++ b/clang-tools-extra/clangd/unittests/DraftStoreTests.cpp @@ -6,11 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "Annotations.h" #include "DraftStore.h" -#include "SourceCode.h" -#include "llvm/Support/ScopedPrinter.h" -#include "llvm/Testing/Support/Error.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/DumpASTTests.cpp b/clang-tools-extra/clangd/unittests/DumpASTTests.cpp index 2f8758da28d3..f316eedfbf60 100644 --- a/clang-tools-extra/clangd/unittests/DumpASTTests.cpp +++ b/clang-tools-extra/clangd/unittests/DumpASTTests.cpp @@ -9,6 +9,7 @@ #include "Annotations.h" #include "DumpAST.h" #include "TestTU.h" +#include "clang/AST/ASTTypeTraits.h" #include "llvm/Support/ScopedPrinter.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/FileIndexTests.cpp b/clang-tools-extra/clangd/unittests/FileIndexTests.cpp index 012468b61a96..912d7d0e9613 100644 --- a/clang-tools-extra/clangd/unittests/FileIndexTests.cpp +++ b/clang-tools-extra/clangd/unittests/FileIndexTests.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include "AST.h" #include "Annotations.h" #include "Compiler.h" #include "Headers.h" @@ -26,8 +25,6 @@ #include "index/SymbolID.h" #include "support/Threading.h" #include "clang/Frontend/CompilerInvocation.h" -#include "clang/Frontend/Utils.h" -#include "clang/Index/IndexSymbol.h" #include "clang/Lex/Preprocessor.h" #include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/ArrayRef.h" diff --git a/clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp b/clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp index 73bd5c1a537a..b1b8b4ccd184 100644 --- a/clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp +++ b/clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp @@ -6,9 +6,7 @@ // //===----------------------------------------------------------------------===// #include "Annotations.h" -#include "ClangdServer.h" #include "FindSymbols.h" -#include "SyncAPI.h" #include "TestFS.h" #include "TestTU.h" #include "llvm/ADT/StringRef.h" diff --git a/clang-tools-extra/clangd/unittests/FormatTests.cpp b/clang-tools-extra/clangd/unittests/FormatTests.cpp index e5dee5c957e7..0eb217eeb5e3 100644 --- a/clang-tools-extra/clangd/unittests/FormatTests.cpp +++ b/clang-tools-extra/clangd/unittests/FormatTests.cpp @@ -9,7 +9,6 @@ #include "Format.h" #include "Annotations.h" #include "SourceCode.h" -#include "TestFS.h" #include "clang/Format/Format.h" #include "clang/Tooling/Core/Replacement.h" #include "llvm/Support/Error.h" diff --git a/clang-tools-extra/clangd/unittests/FuzzyMatchTests.cpp b/clang-tools-extra/clangd/unittests/FuzzyMatchTests.cpp index 34554380be9f..b8b3484fdd4a 100644 --- a/clang-tools-extra/clangd/unittests/FuzzyMatchTests.cpp +++ b/clang-tools-extra/clangd/unittests/FuzzyMatchTests.cpp @@ -8,7 +8,6 @@ #include "FuzzyMatch.h" -#include "llvm/ADT/StringExtras.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp b/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp index fcb2e68f6f2a..6480f2f3f39b 100644 --- a/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp +++ b/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp @@ -8,8 +8,8 @@ #include "GlobalCompilationDatabase.h" +#include "CompileCommands.h" #include "Config.h" -#include "Matchers.h" #include "TestFS.h" #include "support/Path.h" #include "support/ThreadsafeFS.h" @@ -17,13 +17,9 @@ #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/FileSystem.h" #include "llvm/Support/FormatVariadic.h" -#include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" -#include "llvm/Support/raw_ostream.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include <chrono> diff --git a/clang-tools-extra/clangd/unittests/HeadersTests.cpp b/clang-tools-extra/clangd/unittests/HeadersTests.cpp index 2a78667ae34c..0eb682b9cb87 100644 --- a/clang-tools-extra/clangd/unittests/HeadersTests.cpp +++ b/clang-tools-extra/clangd/unittests/HeadersTests.cpp @@ -15,12 +15,10 @@ #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/CompilerInvocation.h" #include "clang/Frontend/FrontendActions.h" -#include "clang/Lex/PreprocessorOptions.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/Path.h" -#include "llvm/Support/ScopedPrinter.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/HoverTests.cpp b/clang-tools-extra/clangd/unittests/HoverTests.cpp index 0f07aa9d3b42..25ce19b2c580 100644 --- a/clang-tools-extra/clangd/unittests/HoverTests.cpp +++ b/clang-tools-extra/clangd/unittests/HoverTests.cpp @@ -14,7 +14,6 @@ #include "TestTU.h" #include "index/MemIndex.h" #include "clang/AST/Attr.h" -#include "clang/Basic/Specifiers.h" #include "clang/Index/IndexSymbol.h" #include "llvm/ADT/None.h" #include "llvm/ADT/StringRef.h" diff --git a/clang-tools-extra/clangd/unittests/IndexActionTests.cpp b/clang-tools-extra/clangd/unittests/IndexActionTests.cpp index babdd93bcecd..29300b561ed0 100644 --- a/clang-tools-extra/clangd/unittests/IndexActionTests.cpp +++ b/clang-tools-extra/clangd/unittests/IndexActionTests.cpp @@ -9,6 +9,7 @@ #include "Headers.h" #include "TestFS.h" #include "index/IndexAction.h" +#include "index/Serialization.h" #include "clang/Tooling/Tooling.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/InsertionPointTests.cpp b/clang-tools-extra/clangd/unittests/InsertionPointTests.cpp index 2a2756a703ef..62c06bb86377 100644 --- a/clang-tools-extra/clangd/unittests/InsertionPointTests.cpp +++ b/clang-tools-extra/clangd/unittests/InsertionPointTests.cpp @@ -10,7 +10,6 @@ #include "Protocol.h" #include "SourceCode.h" #include "TestTU.h" -#include "TestWorkspace.h" #include "XRefs.h" #include "refactor/InsertionPoint.h" #include "clang/AST/DeclBase.h" diff --git a/clang-tools-extra/clangd/unittests/LSPClient.cpp b/clang-tools-extra/clangd/unittests/LSPClient.cpp index d2931cb9c24f..21f64c726191 100644 --- a/clang-tools-extra/clangd/unittests/LSPClient.cpp +++ b/clang-tools-extra/clangd/unittests/LSPClient.cpp @@ -1,13 +1,21 @@ -#include "LSPClient.h" -#include "gtest/gtest.h" -#include <condition_variable> +//===-- LSPClient.cpp - Helper for ClangdLSPServer tests ------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +#include "LSPClient.h" #include "Protocol.h" #include "TestFS.h" #include "Transport.h" +#include "support/Logger.h" #include "support/Threading.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" +#include "gtest/gtest.h" +#include <condition_variable> #include <queue> namespace clang { diff --git a/clang-tools-extra/clangd/unittests/LSPClient.h b/clang-tools-extra/clangd/unittests/LSPClient.h index 307946ba1ed9..a0f3a31144fb 100644 --- a/clang-tools-extra/clangd/unittests/LSPClient.h +++ b/clang-tools-extra/clangd/unittests/LSPClient.h @@ -9,11 +9,11 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_LSPCLIENT_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_LSPCLIENT_H -#include <condition_variable> -#include <deque> #include <llvm/ADT/Optional.h> #include <llvm/Support/Error.h> #include <llvm/Support/JSON.h> +#include <condition_variable> +#include <deque> #include <mutex> namespace clang { diff --git a/clang-tools-extra/clangd/unittests/ModulesTests.cpp b/clang-tools-extra/clangd/unittests/ModulesTests.cpp index 0fdc22c95433..acd0fa311181 100644 --- a/clang-tools-extra/clangd/unittests/ModulesTests.cpp +++ b/clang-tools-extra/clangd/unittests/ModulesTests.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include "Annotations.h" #include "TestFS.h" #include "TestTU.h" #include "gmock/gmock.h" diff --git a/clang-tools-extra/clangd/unittests/ParsedASTTests.cpp b/clang-tools-extra/clangd/unittests/ParsedASTTests.cpp index f5ea5ee61c24..1753f20f8521 100644 --- a/clang-tools-extra/clangd/unittests/ParsedASTTests.cpp +++ b/clang-tools-extra/clangd/unittests/ParsedASTTests.cpp @@ -32,9 +32,7 @@ #include "clang/Lex/PPCallbacks.h" #include "clang/Lex/Token.h" #include "clang/Tooling/Syntax/Tokens.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/ScopedPrinter.h" #include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/PreambleTests.cpp b/clang-tools-extra/clangd/unittests/PreambleTests.cpp index 1bb87b8138c2..49d39000d6b7 100644 --- a/clang-tools-extra/clangd/unittests/PreambleTests.cpp +++ b/clang-tools-extra/clangd/unittests/PreambleTests.cpp @@ -16,17 +16,14 @@ #include "TestTU.h" #include "XRefs.h" #include "clang/Format/Format.h" +#include "clang/Frontend/FrontendActions.h" #include "clang/Frontend/PrecompiledPreamble.h" -#include "clang/Lex/PreprocessorOptions.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/VirtualFileSystem.h" #include "gmock/gmock.h" #include "gtest/gtest.h" -#include <clang/Frontend/FrontendActions.h> #include <memory> #include <string> #include <vector> diff --git a/clang-tools-extra/clangd/unittests/PrintASTTests.cpp b/clang-tools-extra/clangd/unittests/PrintASTTests.cpp index d0e2c2406abf..746966bbf171 100644 --- a/clang-tools-extra/clangd/unittests/PrintASTTests.cpp +++ b/clang-tools-extra/clangd/unittests/PrintASTTests.cpp @@ -13,7 +13,6 @@ #include "TestTU.h" #include "clang/AST/RecursiveASTVisitor.h" #include "gmock/gmock.h" -#include "gtest/gtest-param-test.h" #include "gtest/gtest.h" namespace clang { diff --git a/clang-tools-extra/clangd/unittests/QualityTests.cpp b/clang-tools-extra/clangd/unittests/QualityTests.cpp index 7e519abfac8c..576779fa3270 100644 --- a/clang-tools-extra/clangd/unittests/QualityTests.cpp +++ b/clang-tools-extra/clangd/unittests/QualityTests.cpp @@ -20,9 +20,9 @@ #include "Quality.h" #include "TestFS.h" #include "TestTU.h" +#include "index/FileIndex.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclCXX.h" -#include "clang/AST/Type.h" #include "clang/Sema/CodeCompleteConsumer.h" #include "llvm/Support/Casting.h" #include "gmock/gmock.h" diff --git a/clang-tools-extra/clangd/unittests/RIFFTests.cpp b/clang-tools-extra/clangd/unittests/RIFFTests.cpp index 004918b68db5..1430abd98ef1 100644 --- a/clang-tools-extra/clangd/unittests/RIFFTests.cpp +++ b/clang-tools-extra/clangd/unittests/RIFFTests.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "RIFF.h" +#include "llvm/Support/ScopedPrinter.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp b/clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp index acada4180b0f..a4e901d14099 100644 --- a/clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp +++ b/clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp @@ -7,11 +7,9 @@ //===----------------------------------------------------------------------===// #include "Annotations.h" -#include "ClangdServer.h" #include "Protocol.h" #include "SemanticHighlighting.h" #include "SourceCode.h" -#include "TestFS.h" #include "TestTU.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLExtras.h" diff --git a/clang-tools-extra/clangd/unittests/SemanticSelectionTests.cpp b/clang-tools-extra/clangd/unittests/SemanticSelectionTests.cpp index 1138ce7f0e0c..397494e80f9e 100644 --- a/clang-tools-extra/clangd/unittests/SemanticSelectionTests.cpp +++ b/clang-tools-extra/clangd/unittests/SemanticSelectionTests.cpp @@ -8,15 +8,11 @@ #include "Annotations.h" #include "ClangdServer.h" -#include "Matchers.h" #include "Protocol.h" #include "SemanticSelection.h" -#include "SourceCode.h" #include "SyncAPI.h" #include "TestFS.h" #include "TestTU.h" -#include "clang/Basic/SourceLocation.h" -#include "clang/Basic/SourceManager.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/Support/Error.h" #include "gmock/gmock.h" diff --git a/clang-tools-extra/clangd/unittests/SerializationTests.cpp b/clang-tools-extra/clangd/unittests/SerializationTests.cpp index 6070b229f31c..efbaed233c5b 100644 --- a/clang-tools-extra/clangd/unittests/SerializationTests.cpp +++ b/clang-tools-extra/clangd/unittests/SerializationTests.cpp @@ -8,11 +8,9 @@ #include "Headers.h" #include "RIFF.h" -#include "index/Index.h" #include "index/Serialization.h" #include "support/Logger.h" #include "clang/Tooling/CompilationDatabase.h" -#include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Compression.h" #include "llvm/Support/Error.h" diff --git a/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp b/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp index 167f152a3a39..96e0c8cd6b1d 100644 --- a/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp +++ b/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp @@ -15,7 +15,6 @@ #include "clang/Basic/TokenKinds.h" #include "clang/Format/Format.h" #include "llvm/Support/Error.h" -#include "llvm/Support/raw_os_ostream.h" #include "llvm/Testing/Support/Annotations.h" #include "llvm/Testing/Support/Error.h" #include "gmock/gmock.h" diff --git a/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp b/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp index 2693d0ee00d3..107635267408 100644 --- a/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp +++ b/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp @@ -6,17 +6,9 @@ // //===----------------------------------------------------------------------===// #include "Annotations.h" -#include "Compiler.h" -#include "Matchers.h" #include "ParsedAST.h" -#include "SyncAPI.h" -#include "TestFS.h" #include "TestTU.h" #include "XRefs.h" -#include "index/FileIndex.h" -#include "index/SymbolCollector.h" -#include "clang/Index/IndexingAction.h" -#include "llvm/Support/Path.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp index b63db4b8ccd8..1aaac829d628 100644 --- a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp +++ b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp @@ -25,7 +25,6 @@ #include "clang/Basic/DiagnosticDriver.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/FunctionExtras.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringMap.h" diff --git a/clang-tools-extra/clangd/unittests/TestFS.cpp b/clang-tools-extra/clangd/unittests/TestFS.cpp index 0926c6d72a8a..5fd86122e78b 100644 --- a/clang-tools-extra/clangd/unittests/TestFS.cpp +++ b/clang-tools-extra/clangd/unittests/TestFS.cpp @@ -8,11 +8,11 @@ #include "TestFS.h" #include "GlobalCompilationDatabase.h" #include "URI.h" +#include "support/Logger.h" #include "support/Path.h" #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/Errc.h" #include "llvm/Support/Path.h" namespace clang { diff --git a/clang-tools-extra/clangd/unittests/TestFS.h b/clang-tools-extra/clangd/unittests/TestFS.h index 8a0ea59f6a03..7d3d4d3d03dd 100644 --- a/clang-tools-extra/clangd/unittests/TestFS.h +++ b/clang-tools-extra/clangd/unittests/TestFS.h @@ -11,12 +11,10 @@ //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_TESTFS_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_TESTFS_H -#include "ClangdServer.h" #include "GlobalCompilationDatabase.h" #include "support/Path.h" #include "support/ThreadsafeFS.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" -#include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/Support/Path.h" #include "llvm/Support/VirtualFileSystem.h" diff --git a/clang-tools-extra/clangd/unittests/TestTU.cpp b/clang-tools-extra/clangd/unittests/TestTU.cpp index 989c7737ff59..04ec670a8fa0 100644 --- a/clang-tools-extra/clangd/unittests/TestTU.cpp +++ b/clang-tools-extra/clangd/unittests/TestTU.cpp @@ -12,11 +12,9 @@ #include "Diagnostics.h" #include "TestFS.h" #include "index/FileIndex.h" -#include "index/MemIndex.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Basic/Diagnostic.h" #include "clang/Frontend/CompilerInvocation.h" -#include "clang/Frontend/Utils.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/Support/ScopedPrinter.h" #include "llvm/Support/raw_ostream.h" diff --git a/clang-tools-extra/clangd/unittests/TestTU.h b/clang-tools-extra/clangd/unittests/TestTU.h index 9fc776ced4e0..2140017af297 100644 --- a/clang-tools-extra/clangd/unittests/TestTU.h +++ b/clang-tools-extra/clangd/unittests/TestTU.h @@ -23,7 +23,6 @@ #include "ParsedAST.h" #include "TestFS.h" #include "index/Index.h" -#include "support/Path.h" #include "llvm/ADT/StringMap.h" #include <memory> #include <string> diff --git a/clang-tools-extra/clangd/unittests/TestWorkspace.cpp b/clang-tools-extra/clangd/unittests/TestWorkspace.cpp index 59869d187a5a..3b1f242f380f 100644 --- a/clang-tools-extra/clangd/unittests/TestWorkspace.cpp +++ b/clang-tools-extra/clangd/unittests/TestWorkspace.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "TestWorkspace.h" +#include "index/FileIndex.h" #include "gtest/gtest.h" namespace clang { diff --git a/clang-tools-extra/clangd/unittests/TestWorkspace.h b/clang-tools-extra/clangd/unittests/TestWorkspace.h index 22d378bf9d02..4467c7efb74a 100644 --- a/clang-tools-extra/clangd/unittests/TestWorkspace.h +++ b/clang-tools-extra/clangd/unittests/TestWorkspace.h @@ -16,9 +16,7 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_TESTWORKSPACE_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_TESTWORKSPACE_H -#include "TestFS.h" #include "TestTU.h" -#include "index/FileIndex.h" #include "index/Index.h" #include "llvm/ADT/StringRef.h" #include <string> diff --git a/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp b/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp index f71633661dc7..7cdb6dcc03b6 100644 --- a/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp +++ b/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp @@ -6,20 +6,14 @@ // //===----------------------------------------------------------------------===// #include "Annotations.h" -#include "Compiler.h" #include "Matchers.h" #include "ParsedAST.h" -#include "SyncAPI.h" #include "TestFS.h" #include "TestTU.h" #include "XRefs.h" -#include "index/FileIndex.h" -#include "index/SymbolCollector.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclTemplate.h" -#include "clang/Index/IndexingAction.h" #include "llvm/Support/Path.h" -#include "llvm/Support/ScopedPrinter.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/XRefsTests.cpp b/clang-tools-extra/clangd/unittests/XRefsTests.cpp index 36c5c9c045de..3ecbcfd3726c 100644 --- a/clang-tools-extra/clangd/unittests/XRefsTests.cpp +++ b/clang-tools-extra/clangd/unittests/XRefsTests.cpp @@ -6,22 +6,17 @@ // //===----------------------------------------------------------------------===// #include "Annotations.h" -#include "Compiler.h" -#include "Matchers.h" +#include "AST.h" #include "ParsedAST.h" #include "Protocol.h" #include "SourceCode.h" #include "SyncAPI.h" #include "TestFS.h" -#include "TestIndex.h" #include "TestTU.h" #include "XRefs.h" -#include "index/FileIndex.h" #include "index/MemIndex.h" -#include "index/SymbolCollector.h" #include "clang/AST/Decl.h" #include "clang/Basic/SourceLocation.h" -#include "clang/Index/IndexingAction.h" #include "llvm/ADT/None.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" diff --git a/clang-tools-extra/clangd/unittests/support/CancellationTests.cpp b/clang-tools-extra/clangd/unittests/support/CancellationTests.cpp index 905ee5ecc9c0..074b01b996ae 100644 --- a/clang-tools-extra/clangd/unittests/support/CancellationTests.cpp +++ b/clang-tools-extra/clangd/unittests/support/CancellationTests.cpp @@ -1,7 +1,6 @@ #include "support/Cancellation.h" #include "support/Context.h" #include "support/Threading.h" -#include "llvm/Support/Error.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include <atomic> diff --git a/clang-tools-extra/clangd/unittests/support/MarkupTests.cpp b/clang-tools-extra/clangd/unittests/support/MarkupTests.cpp index 77160e1863a5..2d86c91c7ec0 100644 --- a/clang-tools-extra/clangd/unittests/support/MarkupTests.cpp +++ b/clang-tools-extra/clangd/unittests/support/MarkupTests.cpp @@ -8,7 +8,6 @@ #include "support/Markup.h" #include "clang/Basic/LLVM.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/raw_ostream.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/support/TraceTests.cpp b/clang-tools-extra/clangd/unittests/support/TraceTests.cpp index f7603cedc2bd..b73c7108ddde 100644 --- a/clang-tools-extra/clangd/unittests/support/TraceTests.cpp +++ b/clang-tools-extra/clangd/unittests/support/TraceTests.cpp @@ -7,11 +7,8 @@ //===----------------------------------------------------------------------===// #include "TestTracer.h" -#include "support/Context.h" #include "support/Trace.h" -#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Support/Threading.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/AddUsingTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/AddUsingTests.cpp index b0c2d71328bd..b9b5cf49d2db 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/AddUsingTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/AddUsingTests.cpp @@ -7,9 +7,7 @@ //===----------------------------------------------------------------------===// #include "Config.h" -#include "TestTU.h" #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/DefineInlineTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/DefineInlineTests.cpp index 37d7459b16a0..8d496b2a3ee7 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/DefineInlineTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/DefineInlineTests.cpp @@ -6,9 +6,8 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" +#include "TestFS.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/DefineOutlineTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/DefineOutlineTests.cpp index a872341a871a..3131e2063716 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/DefineOutlineTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/DefineOutlineTests.cpp @@ -6,9 +6,8 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" +#include "TestFS.h" #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/DumpASTTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/DumpASTTests.cpp index fe9ab9a70999..eea9bb361aac 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/DumpASTTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/DumpASTTests.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/DumpRecordLayoutTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/DumpRecordLayoutTests.cpp index 75478dbb3b94..7f7f629e4324 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/DumpRecordLayoutTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/DumpRecordLayoutTests.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/DumpSymbolTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/DumpSymbolTests.cpp index 2a239275d4b1..649eb3d04631 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/DumpSymbolTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/DumpSymbolTests.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include <string> diff --git a/clang-tools-extra/clangd/unittests/tweaks/ExpandAutoTypeTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/ExpandAutoTypeTests.cpp index 1ab4fb3fd2ea..c538e85d4e58 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/ExpandAutoTypeTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/ExpandAutoTypeTests.cpp @@ -6,9 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/ExpandMacroTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/ExpandMacroTests.cpp index 6602fc7e6e6e..cd63ddb257a2 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/ExpandMacroTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/ExpandMacroTests.cpp @@ -6,9 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/ExtractFunctionTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/ExtractFunctionTests.cpp index 94cc4b0a0d84..79450cb4f4c7 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/ExtractFunctionTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/ExtractFunctionTests.cpp @@ -6,9 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/ExtractVariableTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/ExtractVariableTests.cpp index 5862d4938d4a..9740ea2d7098 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/ExtractVariableTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/ExtractVariableTests.cpp @@ -6,9 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/ObjCLocalizeStringLiteralTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/ObjCLocalizeStringLiteralTests.cpp index d52a1b3a78c1..af0498d85ca6 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/ObjCLocalizeStringLiteralTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/ObjCLocalizeStringLiteralTests.cpp @@ -6,9 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/PopulateSwitchTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/PopulateSwitchTests.cpp index 05833736f311..e043cc80c198 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/PopulateSwitchTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/PopulateSwitchTests.cpp @@ -6,9 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" #include "TweakTesting.h" -#include "gmock/gmock-matchers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/RawStringLiteralTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/RawStringLiteralTests.cpp index db92928ba3d0..4bc304559705 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/RawStringLiteralTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/RawStringLiteralTests.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" #include "TweakTesting.h" #include "gmock/gmock-matchers.h" #include "gmock/gmock.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/RemoveUsingNamespaceTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/RemoveUsingNamespaceTests.cpp index 3a15f05041ad..59788e75d169 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/RemoveUsingNamespaceTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/RemoveUsingNamespaceTests.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" #include "TweakTesting.h" #include "gmock/gmock-matchers.h" #include "gmock/gmock.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/ShowSelectionTreeTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/ShowSelectionTreeTests.cpp index 8ec3d3801c42..4c149a62df3d 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/ShowSelectionTreeTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/ShowSelectionTreeTests.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" #include "TweakTesting.h" #include "gmock/gmock-matchers.h" #include "gmock/gmock.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/SwapIfBranchesTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/SwapIfBranchesTests.cpp index 989cfbfcc237..b22da9dcd98b 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/SwapIfBranchesTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/SwapIfBranchesTests.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include "TestTU.h" #include "TweakTesting.h" #include "gmock/gmock-matchers.h" #include "gmock/gmock.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.cpp b/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.cpp index e4637a04a7ed..0c75f6015fbe 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.cpp @@ -10,9 +10,8 @@ #include "Annotations.h" #include "SourceCode.h" -#include "TestFS.h" +#include "TestTU.h" #include "refactor/Tweak.h" -#include "clang/Tooling/Core/Replacement.h" #include "llvm/Support/Error.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.h b/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.h index f87b1fd7f19f..05ff7efc8483 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.h +++ b/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.h @@ -9,7 +9,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_TWEAKS_TWEAKTESTING_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_TWEAKS_TWEAKTESTING_H -#include "TestTU.h" #include "index/Index.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/TweakTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/TweakTests.cpp index 8c8dc5530e09..8bd40c142901 100644 --- a/clang-tools-extra/clangd/unittests/tweaks/TweakTests.cpp +++ b/clang-tools-extra/clangd/unittests/tweaks/TweakTests.cpp @@ -7,8 +7,6 @@ //===----------------------------------------------------------------------===// #include "TestFS.h" -#include "TestTU.h" -#include "TweakTesting.h" #include "refactor/Tweak.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/DiagnosticIDs.h" @@ -18,11 +16,8 @@ #include "clang/Basic/LLVM.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" -#include "clang/Rewrite/Core/Rewriter.h" #include "clang/Tooling/Core/Replacement.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" -#include "llvm/ADT/StringExtras.h" -#include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include "llvm/Support/MemoryBuffer.h" |