clang-tools
7.0.0
|
Handles callbacks from sema, does the include lookup and turns it into an IncludeFixerContext. More...
#include <IncludeFixer.h>
Public Member Functions | |
IncludeFixerSemaSource (SymbolIndexManager &SymbolIndexMgr, bool MinimizeIncludePaths, bool GenerateDiagnostics) | |
void | setCompilerInstance (CompilerInstance *CI) |
void | setFilePath (StringRef FilePath) |
bool | MaybeDiagnoseMissingCompleteType (clang::SourceLocation Loc, clang::QualType T) override |
Callback for incomplete types. More... | |
clang::TypoCorrection | CorrectTypo (const DeclarationNameInfo &Typo, int LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, DeclContext *MemberContext, bool EnteringContext, const ObjCObjectPointerType *OPT) override |
Callback for unknown identifiers. More... | |
std::string | minimizeInclude (StringRef Include, const clang::SourceManager &SourceManager, clang::HeaderSearch &HeaderSearch) const |
Get the minimal include for a given path. More... | |
IncludeFixerContext | getIncludeFixerContext (const clang::SourceManager &SourceManager, clang::HeaderSearch &HeaderSearch, ArrayRef< find_all_symbols::SymbolInfo > MatchedSymbols) const |
Get the include fixer context for the queried symbol. More... | |
ArrayRef< find_all_symbols::SymbolInfo > | getMatchedSymbols () const |
Get the global matched symbols. More... | |
Handles callbacks from sema, does the include lookup and turns it into an IncludeFixerContext.
Definition at line 86 of file IncludeFixer.h.
|
inlineexplicit |
Definition at line 88 of file IncludeFixer.h.
|
override |
Callback for unknown identifiers.
Try to piece together as much qualification as we can get and do a query.
If we have a scope specification, use that to get more precise results.
Definition at line 185 of file IncludeFixer.cpp.
IncludeFixerContext clang::include_fixer::IncludeFixerSemaSource::getIncludeFixerContext | ( | const clang::SourceManager & | SourceManager, |
clang::HeaderSearch & | HeaderSearch, | ||
ArrayRef< find_all_symbols::SymbolInfo > | MatchedSymbols | ||
) | const |
Get the include fixer context for the queried symbol.
Definition at line 326 of file IncludeFixer.cpp.
References FileName, clang::include_fixer::IncludeFixerContext::getFilePath(), Range, and clang::include_fixer::SymbolIndexManager::search().
|
inline |
|
override |
Callback for incomplete types.
If we encounter a forward declaration we have the fully qualified name ready. Just query that.
Definition at line 150 of file IncludeFixer.cpp.
References clang::include_fixer::addDiagnosticsForContext(), and Range.
std::string clang::include_fixer::IncludeFixerSemaSource::minimizeInclude | ( | StringRef | Include, |
const clang::SourceManager & | SourceManager, | ||
clang::HeaderSearch & | HeaderSearch | ||
) | const |
Get the minimal include for a given path.
Definition at line 302 of file IncludeFixer.cpp.
|
inline |
Definition at line 95 of file IncludeFixer.h.
|
inline |
Definition at line 96 of file IncludeFixer.h.
References Loc.