class ExternalSemaSource

Declaration

class ExternalSemaSource : public ExternalASTSource { /* full declaration omitted */ };

Description

An abstract interface that should be implemented by external AST sources that also provide information for semantic analysis.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:50

Inherits from: ExternalASTSource

Member Variables

private static char ID
LLVM-style RTTI.

Method Overview

Inherited from ExternalASTSource:

Methods

virtual clang::TypoCorrection CorrectTypo(
    const clang::DeclarationNameInfo& Typo,
    int LookupKind,
    clang::Scope* S,
    clang::CXXScopeSpec* SS,
    clang::CorrectionCandidateCallback& CCC,
    clang::DeclContext* MemberContext,
    bool EnteringContext,
    const clang::ObjCObjectPointerType* OPT)

Description

\copydoc Sema::CorrectTypo ExternalSemaSource::CorrectTypo is always given the first chance to correct a typo (really, to offer suggestions to repair a failed lookup). It will even be called when SpellChecking is turned off or after a fatal error has already been detected.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:210

Parameters

const clang::DeclarationNameInfo& Typo
int LookupKind
clang::Scope* S
clang::CXXScopeSpec* SS
clang::CorrectionCandidateCallback& CCC
clang::DeclContext* MemberContext
bool EnteringContext
const clang::ObjCObjectPointerType* OPT

ExternalSemaSource()

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:55

virtual void ForgetSema()

Description

Inform the semantic consumer that Sema is no longer available.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:65

virtual void InitializeSema(clang::Sema& S)

Description

Initialize the semantic source with the Sema instance being used to perform semantic analysis on the abstract syntax tree.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:62

Parameters

clang::Sema& S

virtual bool LookupUnqualified(
    clang::LookupResult& R,
    clang::Scope* S)

Description

Do last resort, unqualified lookup on a LookupResult that Sema cannot find.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:96

Parameters

clang::LookupResult& R
a LookupResult that is being recovered.
clang::Scope* S
the Scope of the identifier occurrence.

Returns

true to tell Sema to recover using the LookupResult.

virtual bool MaybeDiagnoseMissingCompleteType(
    clang::SourceLocation Loc,
    clang::QualType T)

Description

Produces a diagnostic note if the external source contains a complete definition for \p T.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:228

Parameters

clang::SourceLocation Loc
the location at which a complete type was required but not provided
clang::QualType T
the \c QualType that should have been complete at \p Loc

Returns

true if a diagnostic was produced, false otherwise.

virtual void ReadDeclsToCheckForDeferredDiags(
    llvm::SmallSetVector<Decl*, 4>& Decls)

Description

Read the set of decls to be checked for deferred diags. The external source should append its own potentially emitted function and variable decls which may cause deferred diags. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:201

Parameters

llvm::SmallSetVector<Decl*, 4>& Decls

virtual void ReadDelegatingConstructors(
    SmallVectorImpl<clang::CXXConstructorDecl*>&
        Decls)

Description

Read the set of delegating constructors known to the external Sema source. The external source should append its own delegating constructors to the given vector of declarations. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:125

Parameters

SmallVectorImpl<clang::CXXConstructorDecl*>& Decls

virtual void ReadExtVectorDecls(
    SmallVectorImpl<clang::TypedefNameDecl*>&
        Decls)

Description

Read the set of ext_vector type declarations known to the external Sema source. The external source should append its own ext_vector type declarations to the given vector of declarations. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:135

Parameters

SmallVectorImpl<clang::TypedefNameDecl*>& Decls

virtual void ReadKnownNamespaces(
    SmallVectorImpl<clang::NamespaceDecl*>&
        Namespaces)

Description

Load the set of namespaces that are known to the external source, which will be used during typo correction.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:77

Parameters

SmallVectorImpl<clang::NamespaceDecl*>& Namespaces

virtual void ReadLateParsedTemplates(
    llvm::MapVector<
        const FunctionDecl*,
        std::unique_ptr<LateParsedTemplate>>&
        LPTMap)

Description

Read the set of late parsed template functions for this source. The external source should insert its own late parsed template functions into the map. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same map entries repeatedly.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:190

Parameters

llvm::MapVector< const FunctionDecl*, std::unique_ptr<LateParsedTemplate>>& LPTMap

virtual void ReadMethodPool(clang::Selector Sel)

Description

Load the contents of the global method pool for a given selector.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:69

Parameters

clang::Selector Sel

virtual void ReadMismatchingDeleteExpressions(
    llvm::MapVector<
        FieldDecl*,
        llvm::SmallVector<
            std::pair<SourceLocation, bool>,
            4>>&)

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:85

Parameters

llvm::MapVector< FieldDecl*, llvm::SmallVector< std::pair<SourceLocation, bool>, 4>>&

virtual void ReadPendingInstantiations(
    SmallVectorImpl<
        std::pair<ValueDecl*, SourceLocation>>&
        Pending)

Description

Read the set of pending instantiations known to the external Sema source. The external source should append its own pending instantiations to the given vector. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same instantiations repeatedly.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:180

Parameters

SmallVectorImpl< std::pair<ValueDecl*, SourceLocation>>& Pending

virtual void ReadReferencedSelectors(
    SmallVectorImpl<
        std::pair<Selector, SourceLocation>>&
        Sels)

Description

Read the set of referenced selectors known to the external Sema source. The external source should append its own referenced selectors to the given vector of selectors. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same selectors repeatedly.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:153

Parameters

SmallVectorImpl< std::pair<Selector, SourceLocation>>& Sels

virtual void ReadTentativeDefinitions(
    SmallVectorImpl<clang::VarDecl*>&
        TentativeDefs)

Description

Read the set of tentative definitions known to the external Sema source. The external source should append its own tentative definitions to the given vector of tentative definitions. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:105

Parameters

SmallVectorImpl<clang::VarDecl*>& TentativeDefs

virtual void ReadUndefinedButUsed(
    llvm::MapVector<NamedDecl*, SourceLocation>&
        Undefined)

Description

Load the set of used but not defined functions or variables with internal linkage, or used but not defined internal functions.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:83

Parameters

llvm::MapVector<NamedDecl*, SourceLocation>& Undefined

virtual void ReadUnusedFileScopedDecls(
    SmallVectorImpl<const clang::DeclaratorDecl*>&
        Decls)

Description

Read the set of unused file-scope declarations known to the external Sema source. The external source should append its own unused, filed-scope to the given vector of declarations. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:115

Parameters

SmallVectorImpl<const clang::DeclaratorDecl*>& Decls

virtual void ReadUnusedLocalTypedefNameCandidates(
    llvm::SmallSetVector<const TypedefNameDecl*,
                         4>& Decls)

Description

Read the set of potentially unused typedefs known to the source. The external source should append its own potentially unused local typedefs to the given vector of declarations. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:143

Parameters

llvm::SmallSetVector<const TypedefNameDecl*, 4>& Decls

virtual void ReadUsedVTables(
    SmallVectorImpl<clang::ExternalVTableUse>&
        VTables)

Description

Read the set of used vtables known to the external Sema source. The external source should append its own used vtables to the given vector. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same vtables repeatedly.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:171

Parameters

SmallVectorImpl<clang::ExternalVTableUse>& VTables

virtual void ReadWeakUndeclaredIdentifiers(
    SmallVectorImpl<
        std::pair<IdentifierInfo*, WeakInfo>>& WI)

Description

Read the set of weak, undeclared identifiers known to the external Sema source. The external source should append its own weak, undeclared identifiers to the given vector. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same identifiers repeatedly.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:163

Parameters

SmallVectorImpl< std::pair<IdentifierInfo*, WeakInfo>>& WI

static bool classof(
    const clang::ExternalASTSource* S)

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:238

Parameters

const clang::ExternalASTSource* S

bool isA(const void* ClassID) const

Description

LLVM-style RTTI. \ {

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:235

Parameters

const void* ClassID

virtual void updateOutOfDateSelector(
    clang::Selector Sel)

Description

Load the contents of the global method pool for a given selector if necessary.

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:73

Parameters

clang::Selector Sel

~ExternalSemaSource()

Declared at: clang/include/clang/Sema/ExternalSemaSource.h:57