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 |
|---|---|
getConstexprSpecifierstd::optional<SgFunctionDeclaration::constexpr_specifier_enum> getConstexprSpecifier() const; | |
getDeclarationGroupOwnerSgDeclarationGroupStatement* getDeclarationGroupOwner() const; | |
getDeclaredExceptionSignatureSgFunctionType* getDeclaredExceptionSignature() const; | |
getDeletionPropertiesstd::optional<deletion_properties> getDeletionProperties() const; | |
getDestructorPropertiesSgFunctionModifier::destructor_properties_enum getDestructorProperties() const; | |
getExplicitSpecifierstd::optional<explicit_specifier> getExplicitSpecifier() const; | |
getFunctionDeclaratorScopeSgDeclarationScope* getFunctionDeclaratorScope() const; | |
getFunctionTypeSgFunctionType* getFunctionType() const; | |
getKindkind getKind() const; | |
getMethodPropertiesstd::optional<method_properties> getMethodProperties() const; | |
getOldStyleDefinitionbool getOldStyleDefinition() const; | |
getSemanticLookupPublicationsemantic_lookup_publication getSemanticLookupPublication() const; | |
getSourceFunctionTypeSgFunctionType* getSourceFunctionType() const; | |
getSourceInsertionAnchorSgStatement* getSourceInsertionAnchor() const; | |
getSourceInsertionAtTopbool getSourceInsertionAtTop() const; | |
getSourceInstantiationDirectiveOwnerSgTemplateInstantiationDirectiveStatement* getSourceInstantiationDirectiveOwner() const; | |
getSourceInterfaceBodyOwnerSgInterfaceBody* getSourceInterfaceBodyOwner() const; | |
getSourceLexicalOwnerSgScopeStatement* getSourceLexicalOwner() const; | |
getSourceParameterListSgFunctionParameterList* getSourceParameterList() const; | |
getSourceReplacementTargetSgFunctionDeclaration* getSourceReplacementTarget() const; | |
getSourceStatementFunctionOwnerSgStatementFunctionStatement* getSourceStatementFunctionOwner() const; | |
getSpecialMemberKindspecial_member_kind getSpecialMemberKind() const; | |
getSpecialMemberPropertiesstd::optional<special_member_properties> getSpecialMemberProperties() const; | |
getTemplateRequiresClauseSgExpression* getTemplateRequiresClause() const; | |
getTrailingRequiresClauseSgExpression* getTrailingRequiresClause() const; | |
semanticSymbolTableKeySgName semanticSymbolTableKey(SgName const& sourceName) const; | Return the exact symbol-table key for this construction transaction. |
sourceDeclaratorUsesWrappedFunctionTypebool sourceDeclaratorUsesWrappedFunctionType() const; | |
withCanonicalFunctionTargetfunction_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. |
withConstexprSpecifierfunction_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. |
withDeclaredExceptionSignaturefunction_declaration_ownership withDeclaredExceptionSignature(SgFunctionType* signature) const; | |
withDeletionPropertiesfunction_declaration_ownership withDeletionProperties( bool is_deleted, bool is_written) const; | |
withDestructorPropertiesfunction_declaration_ownership withDestructorProperties(SgFunctionModifier::destructor_properties_enum properties) const; | |
withExplicitSpecifierfunction_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. |
withFunctionDeclaratorScopefunction_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. |
withFunctionTypefunction_declaration_ownership withFunctionType(SgFunctionType* type) const; | Supply a complete canonical signature before declaration publication. |
withMethodPropertiesfunction_declaration_ownership withMethodProperties(method_properties properties) const; | |
withSemanticParameterListForWrappedFunctionDeclaratorfunction_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. |
withSourceParameterListfunction_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. |
withSpecialMemberKindfunction_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. |
withSpecialMemberPropertiesfunction_declaration_ownership withSpecialMemberProperties( bool is_default, bool is_trivial, bool is_ineligible) const; | |
withTemplateRequiresClausefunction_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. |
withTrailingRequiresClausefunction_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. |
withoutSemanticLookupForRejectedTemplateInstantiationfunction_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 |
|---|---|
semanticAuxiliarystatic function_declaration_ownership semanticAuxiliary(); | |
semanticAuxiliaryCanonicalReplacementOfstatic 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. |
semanticAuxiliaryPendingExactSourcestatic 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. |
semanticAuxiliaryRedeclarationOfstatic 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. |
semanticGroupMemberstatic function_declaration_ownership semanticGroupMember(SgDeclarationGroupStatement* owner); | |
sourceGroupMemberstatic function_declaration_ownership sourceGroupMember(SgDeclarationGroupStatement* owner); | |
sourceGroupRedeclarationstatic 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. |
sourceInstantiationDirectiveMemberstatic function_declaration_ownership sourceInstantiationDirectiveMember(SgTemplateInstantiationDirectiveStatement* owner); | |
sourceInterfaceBodystatic function_declaration_ownership sourceInterfaceBody(SgInterfaceBody* owner); | |
sourceLexicalstatic function_declaration_ownership sourceLexical(); | |
sourceLexicalAtTopstatic function_declaration_ownership sourceLexicalAtTop(SgScopeStatement* lexicalOwner); | |
sourceLexicalBeforestatic function_declaration_ownership sourceLexicalBefore( SgScopeStatement* lexicalOwner, SgStatement* anchor); | |
sourceLexicalCanonicalReplacementAtTopstatic 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. |
sourceLexicalCanonicalReplacementBeforestatic 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. |
sourceLexicalCanonicalReplacementInstatic 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. |
sourceLexicalInstatic function_declaration_ownership sourceLexicalIn(SgScopeStatement* lexicalOwner); | |
sourceLexicalPendingExactSourceInstatic 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. |
sourceLexicalPendingExactSourceRedeclarationInstatic 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. |
sourceLexicalPendingFriendSpecializationInstatic 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. |
sourceLexicalRedeclarationInstatic 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. |
sourceReplacementOfstatic function_declaration_ownership sourceReplacementOf(SgFunctionDeclaration* target); | |
sourceStatementFunctionstatic function_declaration_ownership sourceStatementFunction(SgStatementFunctionStatement* owner); |
Private Member Functions¶
| Name |
|---|
function_declaration_ownershipfunction_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] |
validatevoid validate() const; |
Private Data Members¶
Created with MrDocs