18#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INCLUDECLEANER_H
19#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INCLUDECLEANER_H
25#include "clang-include-cleaner/Types.h"
26#include "clang/Basic/SourceManager.h"
27#include "clang/Tooling/Syntax/Tokens.h"
28#include "llvm/ADT/ArrayRef.h"
29#include "llvm/ADT/StringRef.h"
58 bool AnalyzeAngledIncludes =
false);
60using HeaderFilter = llvm::ArrayRef<std::function<bool(llvm::StringRef)>>;
71std::vector<include_cleaner::SymbolReference>
79 llvm::ArrayRef<include_cleaner::Header> Providers);
Stores and provides access to parsed AST.
Wrapper for vfs::FileSystem for use in multithreaded programs like clangd.
std::vector< include_cleaner::SymbolReference > collectMacroReferences(ParsedAST &AST)
include_cleaner::Includes convertIncludes(const ParsedAST &AST)
Converts the clangd include representation to include-cleaner include representation.
std::vector< Diag > issueIncludeCleanerDiagnostics(ParsedAST &AST, llvm::StringRef Code, const IncludeCleanerFindings &Findings, const ThreadsafeFS &TFS, HeaderFilter IgnoreHeaders)
bool isPreferredProvider(const Inclusion &Inc, const include_cleaner::Includes &Includes, llvm::ArrayRef< include_cleaner::Header > Providers)
Whether this #include is considered to provide a particular symbol.
IncludeCleanerFindings computeIncludeCleanerFindings(ParsedAST &AST, bool AnalyzeAngledIncludes)
llvm::ArrayRef< std::function< bool(llvm::StringRef)> > HeaderFilter
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
std::vector< const Inclusion * > UnusedIncludes
std::vector< MissingIncludeDiagInfo > MissingIncludes
syntax::FileRange SymRefRange
include_cleaner::Symbol Symbol
bool operator==(const MissingIncludeDiagInfo &Other) const
std::vector< include_cleaner::Header > Providers
The class presents a C++ symbol, e.g.