Skip to content

SageBuilder::function_declaration_ownership

Exact, typed structural ownership established by function-declaration builders. Invalid kind/owner combinations cannot be constructed.

Synopsis

Declared in <SageIII/sageInterface/sageBuilder.h>

class [[visibility("default")]] function_declaration_ownership;

Types

Name
deletion_properties
explicit_specifier
method_properties
special_member_properties

Enums

Name Description
kind
semantic_lookup_publication
special_member_kind Function identity known before declaration and symbol publication.

Member Functions

Name Description
getConstexprSpecifier
std::optional<SgFunctionDeclaration::constexpr_specifier_enum> getConstexprSpecifier() const;
getDeclarationGroupOwner
SgDeclarationGroupStatement* getDeclarationGroupOwner() const;
getDeclaredExceptionSignature
SgFunctionType* getDeclaredExceptionSignature() const;
getDeletionProperties
std::optional<deletion_properties> getDeletionProperties() const;
getDestructorProperties
SgFunctionModifier::destructor_properties_enum getDestructorProperties() const;
getExplicitSpecifier
std::optional<explicit_specifier> getExplicitSpecifier() const;
getFunctionDeclaratorScope
SgDeclarationScope* getFunctionDeclaratorScope() const;
getFunctionType
SgFunctionType* getFunctionType() const;
getKind
kind getKind() const;
getMethodProperties
std::optional<method_properties> getMethodProperties() const;
getOldStyleDefinition
bool getOldStyleDefinition() const;
getSemanticLookupPublication
semantic_lookup_publication getSemanticLookupPublication() const;
getSourceFunctionType
SgFunctionType* getSourceFunctionType() const;
getSourceInsertionAnchor
SgStatement* getSourceInsertionAnchor() const;
getSourceInsertionAtTop
bool getSourceInsertionAtTop() const;
getSourceInstantiationDirectiveOwner
SgTemplateInstantiationDirectiveStatement* getSourceInstantiationDirectiveOwner() const;
getSourceInterfaceBodyOwner
SgInterfaceBody* getSourceInterfaceBodyOwner() const;
getSourceLexicalOwner
SgScopeStatement* getSourceLexicalOwner() const;
getSourceParameterList
SgFunctionParameterList* getSourceParameterList() const;
getSourceReplacementTarget
SgFunctionDeclaration* getSourceReplacementTarget() const;
getSourceStatementFunctionOwner
SgStatementFunctionStatement* getSourceStatementFunctionOwner() const;
getSpecialMemberKind
special_member_kind getSpecialMemberKind() const;
getSpecialMemberProperties
std::optional<special_member_properties> getSpecialMemberProperties() const;
getTemplateRequiresClause
SgExpression* getTemplateRequiresClause() const;
getTrailingRequiresClause
SgExpression* getTrailingRequiresClause() const;
semanticSymbolTableKey
SgName semanticSymbolTableKey(SgName const& sourceName) const;
Return the exact symbol-table key for this construction transaction.
sourceDeclaratorUsesWrappedFunctionType
bool sourceDeclaratorUsesWrappedFunctionType() const;
withCanonicalFunctionTarget
function_declaration_ownership withCanonicalFunctionTarget(SgFunctionDeclaration* target) const;
Retarget an in-progress redeclaration or canonical-replacement transaction after re-entrant construction has re-rooted the same exact function family. All other typed construction properties are preserved. The replacement must be the family's self-canonical declaration.
withConstexprSpecifier
function_declaration_ownership withConstexprSpecifier(SgFunctionDeclaration::constexpr_specifier_enum specifier) const;
Supply the specifier before publication. Without an explicit value, redeclarations inherit their exact canonical declaration's specifier.
withDeclaredExceptionSignature
function_declaration_ownership withDeclaredExceptionSignature(SgFunctionType* signature) const;
withDeletionProperties
function_declaration_ownership withDeletionProperties( bool is_deleted, bool is_written) const;
withDestructorProperties
function_declaration_ownership withDestructorProperties(SgFunctionModifier::destructor_properties_enum properties) const;
withExplicitSpecifier
function_declaration_ownership withExplicitSpecifier( bool isExplicit, SgExpression* condition) const;
Transfer a detached condition and its resolved semantic value before publication. Absence of an input inherits the exact canonical specifier.
withFunctionDeclaratorScope
function_declaration_ownership withFunctionDeclaratorScope( SgDeclarationScope* scope, SgFunctionType* source_type = nullptr, SgFunctionParameterList* source_parameters = nullptr, bool old_style_definition = false) const;
Transfer the declarator scope and source signature during construction. Written parameters must already be bound to this declarator scope.
withFunctionType
function_declaration_ownership withFunctionType(SgFunctionType* type) const;
Supply a complete canonical signature before declaration publication.
withMethodProperties
function_declaration_ownership withMethodProperties(method_properties properties) const;
withSemanticParameterListForWrappedFunctionDeclarator
function_declaration_ownership withSemanticParameterListForWrappedFunctionDeclarator() const;
Preserve a source function declarator whose complete type comes from a typeof specifier and therefore owns semantic parameters but no written parameter-list child. This is a construction contract, not an unparser recovery mode.
withSourceParameterList
function_declaration_ownership withSourceParameterList(SgFunctionParameterList* parameters) const;
Supply an independent, detached written parameter list to a function builder; it constructs and owns the syntax signature before publication.
withSpecialMemberKind
function_declaration_ownership withSpecialMemberKind(special_member_kind specialKind) const;
Add exact special-member identity to a function construction transaction. This is valid only for member-function builders and cannot be changed once present.
withSpecialMemberProperties
function_declaration_ownership withSpecialMemberProperties( bool is_default, bool is_trivial, bool is_ineligible) const;
withTemplateRequiresClause
function_declaration_ownership withTemplateRequiresClause(SgExpression* constraint) const;
Make a translated template-head requires-clause part of a function template's overload identity before its declaration and symbol are constructed. The expression must be detached and is transferred to the newly constructed template function declaration.
withTrailingRequiresClause
function_declaration_ownership withTrailingRequiresClause(SgExpression* constraint) const;
Make a translated trailing requires-clause part of the function overload identity before any declaration or symbol is constructed. The expression must be detached; the builder transfers its ownership to the declaration it constructs.
withoutSemanticLookupForRejectedTemplateInstantiation
function_declaration_ownership withoutSemanticLookupForRejectedTemplateInstantiation() const;
Retain a semantically rejected template instantiation in the auxiliary AST while prohibiting construction of a lookup symbol. The builder validates that this contract is used only for semantic template instantiations; it never publishes and then removes a symbol.

Static Member Functions

Name Description
semanticAuxiliary
static function_declaration_ownership semanticAuxiliary();
semanticAuxiliaryCanonicalReplacementOf
static function_declaration_ownership semanticAuxiliaryCanonicalReplacementOf(SgFunctionDeclaration* target);
Publish a distinct semantic declaration while atomically re-rooting an already published semantic declaration family and its one direct symbol. The replacement target must be exactly auxiliary-owned in the same semantic scope.
semanticAuxiliaryPendingExactSource
static function_declaration_ownership semanticAuxiliaryPendingExactSource();
Publish through semantic auxiliary ownership while leaving the complete function declaration subtree unclassified for one exact frontend source publication. This transaction is valid only in frontend-construction mode and must not be used for defining declarations.
semanticAuxiliaryRedeclarationOf
static function_declaration_ownership semanticAuxiliaryRedeclarationOf(SgFunctionDeclaration* target);
Publish a distinct semantic declaration in the exact auxiliary owner of an already published function family. The target remains canonical and its direct symbol is reused without name/type lookup.
semanticGroupMember
static function_declaration_ownership semanticGroupMember(SgDeclarationGroupStatement* owner);
sourceGroupMember
static function_declaration_ownership sourceGroupMember(SgDeclarationGroupStatement* owner);
sourceGroupRedeclaration
static function_declaration_ownership sourceGroupRedeclaration( SgDeclarationGroupStatement* owner, SgFunctionDeclaration* target);
Publish a source declaration-group member while joining an already published exact function family. The group remains the structural owner and the target supplies the canonical declaration/symbol identity.
sourceInstantiationDirectiveMember
static function_declaration_ownership sourceInstantiationDirectiveMember(SgTemplateInstantiationDirectiveStatement* owner);
sourceInterfaceBody
static function_declaration_ownership sourceInterfaceBody(SgInterfaceBody* owner);
sourceLexical
static function_declaration_ownership sourceLexical();
sourceLexicalAtTop
static function_declaration_ownership sourceLexicalAtTop(SgScopeStatement* lexicalOwner);
sourceLexicalBefore
static function_declaration_ownership sourceLexicalBefore( SgScopeStatement* lexicalOwner, SgStatement* anchor);
sourceLexicalCanonicalReplacementAtTop
static function_declaration_ownership sourceLexicalCanonicalReplacementAtTop( SgScopeStatement* lexicalOwner, SgFunctionDeclaration* target);
Publish a generated declaration at the beginning of an exact lexical owner and make it the canonical declaration/symbol basis of an existing declaration family.
sourceLexicalCanonicalReplacementBefore
static function_declaration_ownership sourceLexicalCanonicalReplacementBefore( SgScopeStatement* lexicalOwner, SgStatement* anchor, SgFunctionDeclaration* target);
Publish a generated declaration immediately before an exact source anchor and make it the canonical declaration/symbol basis of an existing declaration family. The target remains in its original lexical owner.
sourceLexicalCanonicalReplacementIn
static function_declaration_ownership sourceLexicalCanonicalReplacementIn( SgScopeStatement* lexicalOwner, SgFunctionDeclaration* target);
Publish a source declaration in its exact lexical owner while replacing a later source redeclaration that was necessarily constructed first by a re-entrant frontend translation. The replacement target remains in its own lexical source position; only the canonical declaration/symbol basis is re-rooted to the earlier source declaration.
sourceLexicalIn
static function_declaration_ownership sourceLexicalIn(SgScopeStatement* lexicalOwner);
sourceLexicalPendingExactSourceIn
static function_declaration_ownership sourceLexicalPendingExactSourceIn(SgScopeStatement* lexicalOwner);
Construct a frontend source declaration with its exact semantic scope, but keep it physically detached until the frontend has published the immutable source range and translation-unit order. This transaction is valid only in frontend-construction mode.
sourceLexicalPendingExactSourceRedeclarationIn
static function_declaration_ownership sourceLexicalPendingExactSourceRedeclarationIn( SgScopeStatement* lexicalOwner, SgFunctionDeclaration* target);
Construct a distinct source redeclaration in its exact lexical owner, join an already published canonical function family, and leave the declaration subtree unclassified until the frontend publishes its exact source ranges. This is the source/redeclaration transaction for a declaration whose lexical and semantic owners differ, such as a qualified friend member declaration.
sourceLexicalPendingFriendSpecializationIn
static function_declaration_ownership sourceLexicalPendingFriendSpecializationIn(SgScopeStatement* lexicalOwner);
Construct one dependent friend template-id source surface in its exact class lexical owner and namespace semantic scope. Clang has not selected a concrete specialization declaration in this state, so the node carries its typed primary-template identity and deliberately publishes no independent function symbol or redeclaration-chain edge.
sourceLexicalRedeclarationIn
static function_declaration_ownership sourceLexicalRedeclarationIn( SgScopeStatement* lexicalOwner, SgFunctionDeclaration* target);
Publish a distinct source declaration in its exact lexical owner while joining an already published canonical function family. The target remains the canonical declaration and its one direct symbol is reused; no name/type lookup is permitted to select another overload family.
sourceReplacementOf
static function_declaration_ownership sourceReplacementOf(SgFunctionDeclaration* target);
sourceStatementFunction
static function_declaration_ownership sourceStatementFunction(SgStatementFunctionStatement* owner);

Private Member Functions

Name
function_declaration_ownership
function_declaration_ownership( kind ownership_kind, SgScopeStatement* lexical_owner, SgStatement* insertion_anchor, bool insertion_at_top, SgFunctionDeclaration* replacement_target, SgDeclarationGroupStatement* group_owner, SgTemplateInstantiationDirectiveStatement* instantiation_owner, SgInterfaceBody* interface_body_owner, SgStatementFunctionStatement* statement_function_owner, bool source_declarator_uses_wrapped_function_type = false, SgExpression* trailing_requires_clause = nullptr, SgExpression* template_requires_clause = nullptr, semantic_lookup_publication lookup_publication = semantic_lookup_publication::required, special_member_kind special_kind = special_member_kind::none, std::optional<SgFunctionDeclaration::constexpr_specifier_enum> constexpr_specifier = std::nullopt, SgFunctionParameterList* source_parameter_list = nullptr, std::optional<explicit_specifier> explicit_specifier = std::nullopt); [constructor]
validate
void validate() const;

Private Data Members

Name
constexpr_specifier_
declared_exception_signature_
deletion_properties_
destructor_properties_
explicit_specifier_
function_declarator_scope_
function_type_
group_owner_
insertion_anchor_
insertion_at_top_
instantiation_owner_
interface_body_owner_
lexical_owner_
lookup_publication_
method_properties_
old_style_definition_
ownership_kind_
replacement_target_
source_declarator_uses_wrapped_function_type_
source_function_type_
source_parameter_list_
special_kind_
special_member_properties_
statement_function_owner_
template_requires_clause_
trailing_requires_clause_

Created with MrDocs