#include "Headers.h"
#include "Preamble.h"
#include "SourceCode.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/DirectoryLookup.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Tooling/Inclusions/HeaderAnalysis.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Path.h"
#include <cstring>
#include <optional>
#include <string>
namespace clang {
namespace clangd {
class IncludeStructure::RecordHeaders : public PPCallbacks { … };
bool isLiteralInclude(llvm::StringRef Include) { … }
bool HeaderFile::valid() const { … }
llvm::Expected<HeaderFile> toHeaderFile(llvm::StringRef Header,
llvm::StringRef HintPath) { … }
llvm::SmallVector<SymbolInclude, 1> getRankedIncludes(const Symbol &Sym) { … }
void IncludeStructure::collect(const CompilerInstance &CI) { … }
std::optional<IncludeStructure::HeaderID>
IncludeStructure::getID(const FileEntry *Entry) const { … }
IncludeStructure::HeaderID IncludeStructure::getOrCreateID(FileEntryRef Entry) { … }
llvm::DenseMap<IncludeStructure::HeaderID, unsigned>
IncludeStructure::includeDepth(HeaderID Root) const { … }
llvm::SmallVector<const Inclusion *>
IncludeStructure::mainFileIncludesWithSpelling(llvm::StringRef Spelling) const { … }
void IncludeInserter::addExisting(const Inclusion &Inc) { … }
bool IncludeInserter::shouldInsertInclude(
PathRef DeclaringHeader, const HeaderFile &InsertedHeader) const { … }
std::optional<std::string>
IncludeInserter::calculateIncludePath(const HeaderFile &InsertedHeader,
llvm::StringRef IncludingFile) const { … }
std::optional<TextEdit>
IncludeInserter::insert(llvm::StringRef VerbatimHeader,
tooling::IncludeDirective Directive) const { … }
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Inclusion &Inc) { … }
bool operator==(const Inclusion &LHS, const Inclusion &RHS) { … }
}
}