clang-tools
15.0.0git
|
#include "IncludeCleaner.h"
#include "Config.h"
#include "Headers.h"
#include "ParsedAST.h"
#include "Protocol.h"
#include "SourceCode.h"
#include "index/CanonicalIncludes.h"
#include "support/Logger.h"
#include "support/Trace.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Tooling/Syntax/Tokens.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Regex.h"
#include <functional>
Go to the source code of this file.
Namespaces | |
clang | |
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===// | |
clang::clangd | |
Functions | |
void | clang::clangd::setIncludeCleanerAnalyzesStdlib (bool B) |
Affects whether standard library includes should be considered for removal. More... | |
ReferencedLocations | clang::clangd::findReferencedLocations (ASTContext &Ctx, Preprocessor &PP, const syntax::TokenBuffer *Tokens) |
Finds locations of all symbols used in the main file. More... | |
ReferencedLocations | clang::clangd::findReferencedLocations (ParsedAST &AST) |
ReferencedFiles | clang::clangd::findReferencedFiles (const ReferencedLocations &Locs, const SourceManager &SM, llvm::function_ref< FileID(FileID)> HeaderResponsible, llvm::function_ref< Optional< StringRef >(FileID)> UmbrellaHeader) |
Retrieves IDs of all files containing SourceLocations from Locs . More... | |
ReferencedFiles | clang::clangd::findReferencedFiles (const ReferencedLocations &Locs, const IncludeStructure &Includes, const CanonicalIncludes &CanonIncludes, const SourceManager &SM) |
std::vector< const Inclusion * > | clang::clangd::getUnused (ParsedAST &AST, const llvm::DenseSet< IncludeStructure::HeaderID > &ReferencedFiles, const llvm::StringSet<> &ReferencedPublicHeaders) |
Retrieves headers that are referenced from the main file but not used. More... | |
static bool | clang::clangd::isSpecialBuffer (FileID FID, const SourceManager &SM) |
llvm::DenseSet< IncludeStructure::HeaderID > | clang::clangd::translateToHeaderIDs (const ReferencedFiles &Files, const IncludeStructure &Includes, const SourceManager &SM) |
Maps FileIDs to the internal IncludeStructure representation (HeaderIDs). More... | |
std::vector< const Inclusion * > | clang::clangd::computeUnusedIncludes (ParsedAST &AST) |
std::vector< Diag > | clang::clangd::issueUnusedIncludesDiagnostics (ParsedAST &AST, llvm::StringRef Code) |
Variables | |
static bool | clang::clangd::AnalyzeStdlib = false |
llvm::DenseSet<FileID> Files |
Definition at line 194 of file IncludeCleaner.cpp.
Referenced by clang::replace::applyChanges(), clang::clangd::FileSymbols::buildIndex(), clang::clangd::buildTestFS(), clang::replace::deleteReplacementFiles(), and main().
llvm::DenseSet<FileID> Macros |
Definition at line 195 of file IncludeCleaner.cpp.
Referenced by clang::clangd::ParsedAST::getMacros().