36 IncludeFixer(llvm::StringRef File, std::shared_ptr<IncludeInserter> Inserter,
37 const SymbolIndex &Index,
unsigned IndexRequestLimit,
39 : File(File), Inserter(std::
move(Inserter)), Index(Index),
40 IndexRequestLimit(IndexRequestLimit), Directive(Directive) {}
44 std::vector<Fix>
fix(DiagnosticsEngine::Level DiagLevel,
45 const clang::Diagnostic &
Info)
const;
54 std::vector<Fix> fixIncompleteType(
const Type &T)
const;
57 std::vector<Fix> fixesForSymbols(
const SymbolSlab &Syms)
const;
59 std::optional<Fix> insertHeader(llvm::StringRef Name,
60 llvm::StringRef
Symbol =
"",
61 tooling::IncludeDirective Directive =
62 tooling::IncludeDirective::Include)
const;
64 struct UnresolvedName {
67 std::vector<std::string> Scopes;
71 class UnresolvedNameRecorder;
77 std::vector<Fix> fixUnresolvedName()
const;
80 std::shared_ptr<IncludeInserter> Inserter;
81 const SymbolIndex &Index;
82 const unsigned IndexRequestLimit;
83 mutable unsigned IndexRequestCount = 0;
88 std::optional<UnresolvedName> LastUnresolvedName;
94 mutable llvm::StringMap<SymbolSlab> FuzzyFindCache;
95 mutable llvm::DenseMap<SymbolID, SymbolSlab> LookupCache;
97 std::optional<const SymbolSlab *>
98 fuzzyFindCached(
const FuzzyFindRequest &Req)
const;
99 std::optional<const SymbolSlab *> lookupCached(
const SymbolID &ID)
const;