A structure that contains the results of a name lookup operation.
- auto addDiag(const Scope& scope, DiagCode code, SourceLocation location) -> Diagnostic&
- auto addDiag(const Scope& scope, DiagCode code, SourceRange sourceRange) -> Diagnostic&
- auto getDiagnostics() const -> const Diagnostics&
- auto hasError() const -> bool
- Returns true if an error occurred during lookup.
- void clear()
- Clears the structure of all results, as if it had been default initialized.
- void copyFrom(const LookupResult& other)
- Copies result members from the given result object.
- void reportErrors(const BindContext& context)
- const Symbol* found
- const SystemSubroutine* systemSubroutine
- bool wasImported
- Set to true if the found symbol was imported from a package.
- bool isHierarchical
- Set to true if the lookup was hierarchical.
- bool sawBadImport
- bool fromTypeParam
- bool fromForwardTypedef
- SmallVectorSized<Selector, 4> selectors
Set to true if we observed an invalid import statement somewhere during lookup. This means the lack of a found symbol should be treated with caution, because it could be the import failure causing it instead of some otherwise invalid name.
Set to true if the lookup was resolved through a type parameter. Some language rules restrict where this can be done.
Set to true if the lookup was resolved through a forwarded typedef. Some language rules restrict where this can be done.