sun::semantic_analysis::AccessFilter
class · Source (opens in a new tab)
class sun::semantic_analysis::AccessFilterAccessFilter — admits lookup results the asking module may see and remembers the first private one it skipped, so a lookup that finds only
private candidates reports "is private to ..." instead of "unknown".
Public Functions
AccessFilter
public · function · Source (opens in a new tab)
sun::semantic_analysis::AccessFilter::AccessFilter(const SemanticScopeBase *scope)Creates a visibility filter for lookups from the supplied scope.
Related: SemanticScopeBase
admit
public · function · Source (opens in a new tab)
template <typename T>
bool sun::semantic_analysis::AccessFilter::admit(const T &result)Filters a lookup result according to the current scope's access rights.
admitItem
public · function · Source (opens in a new tab)
bool sun::semantic_analysis::AccessFilter::admitItem(sun::semantic_analysis::ItemRef item)Accepts a declaration only if the current scope may access it.
Related: sun::semantic_analysis::ItemRef
enabled
public · function · Source (opens in a new tab)
bool sun::semantic_analysis::AccessFilter::enabled() constReports whether lookups are subject to visibility filtering.
finish
public · function · Source (opens in a new tab)
void sun::semantic_analysis::AccessFilter::finish() constThrows the recorded denial, if any.
from
public · function · Source (opens in a new tab)
sun::semantic_analysis::DeclarationId sun::semantic_analysis::AccessFilter::from() constReturns the scope from which declaration access is being checked.
Related: sun::semantic_analysis::DeclarationId
hasDenied
public · function · Source (opens in a new tab)
bool sun::semantic_analysis::AccessFilter::hasDenied() constReports whether this object has denied.
Private Fields
ctx_
private · variable · Source (opens in a new tab)
const AccessContext* sun::semantic_analysis::AccessFilter::ctx_ = nullptrNo documentation comment.
Related: AccessContext
denied_
private · variable · Source (opens in a new tab)
std::optional<sun::semantic_analysis::ItemRef> sun::semantic_analysis::AccessFilter::denied_No documentation comment.
Related: sun::semantic_analysis::ItemRef
from_
private · variable · Source (opens in a new tab)
sun::semantic_analysis::DeclarationId sun::semantic_analysis::AccessFilter::from_No documentation comment.