sun::semantic_analysis::SemanticContext::LocationGuard

sun::semantic_analysis::SemanticContext::LocationGuard

struct · Source (opens in a new tab)

struct sun::semantic_analysis::SemanticContext::LocationGuard

Record the expression being analyzed for the enclosed block, so an access denial raised deep inside a lookup can still point at source.

Public Functions

LocationGuard

LocationGuard(SemanticContext &c, const sun::support::Position &loc)

public · function · Source (opens in a new tab)

sun::semantic_analysis::SemanticContext::LocationGuard::LocationGuard(SemanticContext &c, const sun::support::Position &loc)

Changes the diagnostic source position and saves the previous position.

Related: SemanticContext, sun::support::Position

LocationGuard(const LocationGuard &)=delete

public · function · Source (opens in a new tab)

sun::semantic_analysis::SemanticContext::LocationGuard::LocationGuard(const LocationGuard &)=delete

Changes the diagnostic source position and saves the previous position.

operator=

public · function · Source (opens in a new tab)

LocationGuard & sun::semantic_analysis::SemanticContext::LocationGuard::operator=(const LocationGuard &)=delete

Disallows assignment so ownership and object identity cannot be duplicated.

Related: LocationGuard

~LocationGuard

public · function · Source (opens in a new tab)

sun::semantic_analysis::SemanticContext::LocationGuard::~LocationGuard()

Restores the source position used for subsequent diagnostics.

Public Fields

ctx

public · variable · Source (opens in a new tab)

SemanticContext& sun::semantic_analysis::SemanticContext::LocationGuard::ctx

No documentation comment.

Related: SemanticContext