class ParmVarDecl
Declaration
class ParmVarDecl : public VarDecl { /* full declaration omitted */ };
Description
Represents a parameter to a function.
Declared at: clang/include/clang/AST/Decl.h:1680
Inherits from: VarDecl
Member Variables
Inherited from VarDecl:
Inherited from Decl:
- protected NextInContextAndBits
- protected Access
- protected FromASTFile
- protected IdentifierNamespace
- protected CacheValidAndLinkage
Method Overview
- public static clang::ParmVarDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation StartLoc, clang::SourceLocation IdLoc, clang::IdentifierInfo * Id, clang::QualType T, clang::TypeSourceInfo * TInfo, clang::StorageClass S, clang::Expr * DefArg)
- public static clang::ParmVarDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
- protected ParmVarDecl(clang::Decl::Kind DK, clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation StartLoc, clang::SourceLocation IdLoc, clang::IdentifierInfo * Id, clang::QualType T, clang::TypeSourceInfo * TInfo, clang::StorageClass S, clang::Expr * DefArg)
- public static bool classof(const clang::Decl * D)
- public static bool classofKind(clang::Decl::Kind K)
- public const clang::Expr * getDefaultArg() const
- public clang::Expr * getDefaultArg()
- public clang::SourceRange getDefaultArgRange() const
- public unsigned int getFunctionScopeDepth() const
- public unsigned int getFunctionScopeIndex() const
- public static constexpr unsigned int getMaxFunctionScopeDepth()
- public clang::Decl::ObjCDeclQualifier getObjCDeclQualifier() const
- public clang::QualType getOriginalType() const
- private unsigned int getParameterIndex() const
- private unsigned int getParameterIndexLarge() const
- public clang::SourceRange getSourceRange() const
- public clang::Expr * getUninstantiatedDefaultArg()
- public const clang::Expr * getUninstantiatedDefaultArg() const
- public bool hasDefaultArg() const
- public bool hasInheritedDefaultArg() const
- public bool hasUninstantiatedDefaultArg() const
- public bool hasUnparsedDefaultArg() const
- public bool isDestroyedInCallee() const
- public bool isKNRPromoted() const
- public bool isObjCMethodParameter() const
- public void setDefaultArg(clang::Expr * defarg)
- public void setHasInheritedDefaultArg(bool I = true)
- public void setKNRPromoted(bool promoted)
- public void setObjCDeclQualifier(clang::Decl::ObjCDeclQualifier QTVal)
- public void setObjCMethodScopeInfo(unsigned int parameterIndex)
- public void setOwningFunction(clang::DeclContext * FD)
- private void setParameterIndex(unsigned int parameterIndex)
- private void setParameterIndexLarge(unsigned int parameterIndex)
- public void setScopeInfo(unsigned int scopeDepth, unsigned int parameterIndex)
- public void setUninstantiatedDefaultArg(clang::Expr * arg)
- public void setUnparsedDefaultArg()
Inherited from VarDecl:
- public Create
- public CreateDeserialized
- public checkForConstantInitialization
- public classof
- public classofKind
- public demoteThisDefinitionToDeclaration
- public ensureEvaluatedStmt
- public evaluateDestruction
- public evaluateValue
- public getActingDefinition
- public getActingDefinition
- public getAnyInitializer
- public getAnyInitializer
- public getCanonicalDecl
- public getCanonicalDecl
- public getDefinition
- public getDefinition
- public getDefinition
- public getDefinition
- public getDescribedVarTemplate
- public getEvaluatedStmt
- public getEvaluatedValue
- public getFlexibleArrayInitChars
- public getInit
- public getInit
- public getInitAddress
- public getInitStyle
- public getInitializingDeclaration
- public getInitializingDeclaration
- public getInstantiatedFromStaticDataMember
- public getLanguageLinkage
- public getMemberSpecializationInfo
- protected getMostRecentDeclImpl
- protected getNextRedeclarationImpl
- public getPointOfInstantiation
- protected getPreviousDeclImpl
- public getSourceRange
- public getStorageClass
- public getStorageClassSpecifierString
- public getStorageDuration
- public getTLSKind
- public getTSCSpec
- public getTemplateInstantiationPattern
- public getTemplateSpecializationKind
- public getTemplateSpecializationKindForInstantiation
- public hasConstantInitialization
- public hasDefinition
- public hasDefinition
- public hasDependentAlignment
- public hasExternalStorage
- public hasFlexibleArrayInit
- public hasGlobalStorage
- public hasICEInitializer
- public hasInit
- public hasLocalStorage
- public isARCPseudoStrong
- public isCXXForRangeDecl
- public isConstexpr
- public isDirectInit
- public isEscapingByref
- public isExceptionVariable
- public isExternC
- public isFileVarDecl
- public isFunctionOrMethodVarDecl
- public isInExternCContext
- public isInExternCXXContext
- public isInitCapture
- public isInline
- public isInlineSpecified
- public isKnownToBeDefined
- public isLocalVarDecl
- public isLocalVarDeclOrParm
- public isNRVOVariable
- public isNoDestroy
- public isNonEscapingByref
- public isObjCForDecl
- public isOutOfLine
- public isParameterPack
- public isPreviousDeclInSameBlockScope
- public isStaticDataMember
- public isStaticLocal
- public isThisDeclarationADefinition
- public isThisDeclarationADefinition
- public isThisDeclarationADemotedDefinition
- public isUsableInConstantExpressions
- public mightBeUsableInConstantExpressions
- public needsDestruction
- public setARCPseudoStrong
- public setCXXForRangeDecl
- public setConstexpr
- public setDescribedVarTemplate
- public setEscapingByref
- public setExceptionVariable
- public setImplicitlyInline
- public setInit
- public setInitCapture
- public setInitStyle
- public setInlineSpecified
- public setInstantiationOfStaticDataMember
- public setNRVOVariable
- public setObjCForDecl
- public setPreviousDeclInSameBlockScope
- public setStorageClass
- public setTSCSpec
- public setTemplateSpecializationKind
Inherited from DeclaratorDecl:
- public classof
- public classofKind
- public getBeginLoc
- public getInnerLocStart
- public getNumTemplateParameterLists
- public getOuterLocStart
- public getQualifier
- public getQualifierLoc
- public getSourceRange
- public getTemplateParameterList
- public getTrailingRequiresClause
- public getTrailingRequiresClause
- public getTypeSourceInfo
- public getTypeSpecEndLoc
- public getTypeSpecStartLoc
- public setInnerLocStart
- public setQualifierInfo
- public setTemplateParameterListsInfo
- public setTrailingRequiresClause
- public setTypeSourceInfo
Inherited from ValueDecl:
Inherited from NamedDecl:
- public classof
- public classofKind
- public declarationReplaces
- public getDeclName
- public getExplicitVisibility
- public getFormalLinkage
- public getIdentifier
- public getLinkageAndVisibility
- public getLinkageInternal
- public getMostRecentDecl
- public getMostRecentDecl
- public getName
- public getNameAsString
- public getNameForDiagnostic
- public getObjCFStringFormattingFamily
- public getQualifiedNameAsString
- public getUnderlyingDecl
- public getUnderlyingDecl
- public getVisibility
- public hasExternalFormalLinkage
- public hasLinkage
- public hasLinkageBeenComputed
- public isCXXClassMember
- public isCXXInstanceMember
- public isExternallyDeclarable
- public isExternallyVisible
- public isLinkageValid
- public isReserved
- public printName
- public printNestedNameSpecifier
- public printNestedNameSpecifier
- public printQualifiedName
- public printQualifiedName
- public setDeclName
Inherited from Decl:
- public EnableStatistics
- public PrintStats
- public add
- public addAttr
- public attr_begin
- public attr_end
- public attrs
- public canBeWeakImported
- public castFromDeclContext
- public castToDeclContext
- public classofKind
- public dropAttr
- public dropAttrs
- public dump
- public dump
- public dumpColor
- public getASTContext
- protected getASTMutationListener
- public getAccess
- public getAccessUnsafe
- public getAsFunction
- public getAsFunction
- public getAttr
- public getAttrs
- public getAttrs
- public getAvailability
- public getBeginLoc
- public getBody
- public getBodyRBrace
- protected getCachedLinkage
- public getCanonicalDecl
- public getCanonicalDecl
- public getDeclContext
- public getDeclContext
- public getDeclKindName
- public getDefiningAttr
- public getDescribedTemplate
- public getDescribedTemplateParams
- public getEndLoc
- public getExternalSourceSymbolAttr
- public getFriendObjectKind
- public getFunctionType
- public getGlobalID
- public getID
- public getIdentifierNamespace
- public getIdentifierNamespaceForKind
- public getImportedOwningModule
- public getKind
- public getLangOpts
- public getLexicalDeclContext
- public getLexicalDeclContext
- public getLocalOwningModule
- public getLocation
- public getMaxAlignment
- public getModuleOwnershipKind
- public getMostRecentDecl
- public getMostRecentDecl
- protected getMostRecentDeclImpl
- public getNextDeclInContext
- public getNextDeclInContext
- protected getNextRedeclarationImpl
- public getNonClosureContext
- public getNonClosureContext
- public getOwningModule
- public getOwningModuleForLinkage
- public getOwningModuleID
- public getParentFunctionOrMethod
- public getParentFunctionOrMethod
- public getPreviousDecl
- public getPreviousDecl
- protected getPreviousDeclImpl
- public getSourceRange
- public getTemplateDepth
- public getTranslationUnitDecl
- public getTranslationUnitDecl
- public getVersionIntroduced
- public hasAttr
- public hasAttrs
- public hasBody
- protected hasCachedLinkage
- public hasDefiningAttr
- protected hasLocalOwningModuleStorage
- public hasOwningModule
- public hasTagIdentifierNamespace
- public isCanonicalDecl
- public isDefinedOutsideFunctionOrMethod
- public isDeprecated
- public isDiscardedInGlobalModuleFragment
- public isFirstDecl
- public isFromASTFile
- public isFunctionOrFunctionTemplate
- public isImplicit
- public isInAnonymousNamespace
- public isInExportDeclContext
- public isInIdentifierNamespace
- public isInLocalScopeForInstantiation
- public isInStdNamespace
- public isInvalidDecl
- public isInvisibleOutsideTheOwningModule
- public isLocalExternDecl
- public isModulePrivate
- public isOutOfLine
- public isParameterPack
- public isReachable
- public isReferenced
- public isTagIdentifierNamespace
- public isTemplateDecl
- public isTemplateParameter
- public isTemplateParameterPack
- public isTemplated
- public isThisDeclarationReferenced
- public isTopLevelDeclInObjCContainer
- public isUnavailable
- public isUnconditionallyVisible
- public isUsed
- public isWeakImported
- public markUsed
- public print
- public print
- public printGroup
- public redecls
- public redecls_begin
- public redecls_end
- public setAccess
- public setAttrs
- protected setCachedLinkage
- public setDeclContext
- public setFromASTFile
- public setImplicit
- public setInvalidDecl
- public setIsUsed
- public setLexicalDeclContext
- public setLocalExternDecl
- public setLocalOwningModule
- public setLocation
- public setModuleOwnershipKind
- protected setModulePrivate
- public setNonMemberOperator
- public setObjectOfFriendDecl
- public setOwningModuleID
- public setReferenced
- public setTopLevelDeclInObjCContainer
- public setVisibleDespiteOwningModule
- public specific_attr_begin
- public specific_attr_end
- public specific_attrs
- protected updateOutOfDate
Methods
¶static clang::ParmVarDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation StartLoc,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id,
clang::QualType T,
clang::TypeSourceInfo* TInfo,
clang::StorageClass S,
clang::Expr* DefArg)
static clang::ParmVarDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation StartLoc,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id,
clang::QualType T,
clang::TypeSourceInfo* TInfo,
clang::StorageClass S,
clang::Expr* DefArg)
Declared at: clang/include/clang/AST/Decl.h:1698
Parameters
- clang::ASTContext& C
- clang::DeclContext* DC
- clang::SourceLocation StartLoc
- clang::SourceLocation IdLoc
- clang::IdentifierInfo* Id
- clang::QualType T
- clang::TypeSourceInfo* TInfo
- clang::StorageClass S
- clang::Expr* DefArg
¶static clang::ParmVarDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID)
static clang::ParmVarDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID)
Declared at: clang/include/clang/AST/Decl.h:1704
Parameters
- clang::ASTContext& C
- unsigned int ID
¶ParmVarDecl(clang::Decl::Kind DK,
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation StartLoc,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id,
clang::QualType T,
clang::TypeSourceInfo* TInfo,
clang::StorageClass S,
clang::Expr* DefArg)
ParmVarDecl(clang::Decl::Kind DK,
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation StartLoc,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id,
clang::QualType T,
clang::TypeSourceInfo* TInfo,
clang::StorageClass S,
clang::Expr* DefArg)
Declared at: clang/include/clang/AST/Decl.h:1686
Parameters
- clang::Decl::Kind DK
- clang::ASTContext& C
- clang::DeclContext* DC
- clang::SourceLocation StartLoc
- clang::SourceLocation IdLoc
- clang::IdentifierInfo* Id
- clang::QualType T
- clang::TypeSourceInfo* TInfo
- clang::StorageClass S
- clang::Expr* DefArg
¶static bool classof(const clang::Decl* D)
static bool classof(const clang::Decl* D)
Declared at: clang/include/clang/AST/Decl.h:1830
Parameters
- const clang::Decl* D
¶static bool classofKind(clang::Decl::Kind K)
static bool classofKind(clang::Decl::Kind K)
Declared at: clang/include/clang/AST/Decl.h:1831
Parameters
- clang::Decl::Kind K
¶const clang::Expr* getDefaultArg() const
const clang::Expr* getDefaultArg() const
Declared at: clang/include/clang/AST/Decl.h:1769
¶clang::Expr* getDefaultArg()
clang::Expr* getDefaultArg()
Declared at: clang/include/clang/AST/Decl.h:1768
¶clang::SourceRange getDefaultArgRange() const
clang::SourceRange getDefaultArgRange() const
Description
Retrieve the source range that covers the entire default argument.
Declared at: clang/include/clang/AST/Decl.h:1777
¶unsigned int getFunctionScopeDepth() const
unsigned int getFunctionScopeDepth() const
Declared at: clang/include/clang/AST/Decl.h:1730
¶unsigned int getFunctionScopeIndex() const
unsigned int getFunctionScopeIndex() const
Description
Returns the index of this parameter in its prototype or method scope.
Declared at: clang/include/clang/AST/Decl.h:1740
¶static constexpr unsigned int
getMaxFunctionScopeDepth()
static constexpr unsigned int
getMaxFunctionScopeDepth()
Declared at: clang/include/clang/AST/Decl.h:1735
¶clang::Decl::ObjCDeclQualifier
getObjCDeclQualifier() const
clang::Decl::ObjCDeclQualifier
getObjCDeclQualifier() const
Declared at: clang/include/clang/AST/Decl.h:1744
¶clang::QualType getOriginalType() const
clang::QualType getOriginalType() const
Declared at: clang/include/clang/AST/Decl.h:1821
¶unsigned int getParameterIndex() const
unsigned int getParameterIndex() const
Declared at: clang/include/clang/AST/Decl.h:1845
¶unsigned int getParameterIndexLarge() const
unsigned int getParameterIndexLarge() const
Declared at: clang/include/clang/AST/Decl.h:1851
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Description
Source range that this declaration covers.
Declared at: clang/include/clang/AST/Decl.h:1706
¶clang::Expr* getUninstantiatedDefaultArg()
clang::Expr* getUninstantiatedDefaultArg()
Declared at: clang/include/clang/AST/Decl.h:1779
¶const clang::Expr* getUninstantiatedDefaultArg()
const
const clang::Expr* getUninstantiatedDefaultArg()
const
Declared at: clang/include/clang/AST/Decl.h:1780
¶bool hasDefaultArg() const
bool hasDefaultArg() const
Description
Determines whether this parameter has a default argument, either parsed or not.
Declared at: clang/include/clang/AST/Decl.h:1786
¶bool hasInheritedDefaultArg() const
bool hasInheritedDefaultArg() const
Declared at: clang/include/clang/AST/Decl.h:1813
¶bool hasUninstantiatedDefaultArg() const
bool hasUninstantiatedDefaultArg() const
Declared at: clang/include/clang/AST/Decl.h:1801
¶bool hasUnparsedDefaultArg() const
bool hasUnparsedDefaultArg() const
Description
Determines whether this parameter has a default argument that has not yet been parsed. This will occur during the processing of a C++ class whose member functions have default arguments, e.g.,
Declared at: clang/include/clang/AST/Decl.h:1797
¶bool isDestroyedInCallee() const
bool isDestroyedInCallee() const
Description
Determines whether this parameter is destroyed in the callee function.
Declared at: clang/include/clang/AST/Decl.h:1728
¶bool isKNRPromoted() const
bool isKNRPromoted() const
Description
True if the value passed to this parameter must undergo K &R -style default argument promotion: C99 6.5.2.2. If the expression that denotes the called function has a type that does not include a prototype, the integer promotions are performed on each argument, and arguments that have type float are promoted to double.
Declared at: clang/include/clang/AST/Decl.h:1761
¶bool isObjCMethodParameter() const
bool isObjCMethodParameter() const
Declared at: clang/include/clang/AST/Decl.h:1723
¶void setDefaultArg(clang::Expr* defarg)
void setDefaultArg(clang::Expr* defarg)
Declared at: clang/include/clang/AST/Decl.h:1773
Parameters
- clang::Expr* defarg
¶void setHasInheritedDefaultArg(bool I = true)
void setHasInheritedDefaultArg(bool I = true)
Declared at: clang/include/clang/AST/Decl.h:1817
Parameters
- bool I = true
¶void setKNRPromoted(bool promoted)
void setKNRPromoted(bool promoted)
Declared at: clang/include/clang/AST/Decl.h:1764
Parameters
- bool promoted
¶void setObjCDeclQualifier(
clang::Decl::ObjCDeclQualifier QTVal)
void setObjCDeclQualifier(
clang::Decl::ObjCDeclQualifier QTVal)
Declared at: clang/include/clang/AST/Decl.h:1748
Parameters
- clang::Decl::ObjCDeclQualifier QTVal
¶void setObjCMethodScopeInfo(
unsigned int parameterIndex)
void setObjCMethodScopeInfo(
unsigned int parameterIndex)
Declared at: clang/include/clang/AST/Decl.h:1708
Parameters
- unsigned int parameterIndex
¶void setOwningFunction(clang::DeclContext* FD)
void setOwningFunction(clang::DeclContext* FD)
Description
Sets the function declaration that owns this ParmVarDecl. Since ParmVarDecls are often created before the FunctionDecls that own them, this routine is required to update the DeclContext appropriately.
Declared at: clang/include/clang/AST/Decl.h:1827
Parameters
¶void setParameterIndex(
unsigned int parameterIndex)
void setParameterIndex(
unsigned int parameterIndex)
Declared at: clang/include/clang/AST/Decl.h:1836
Parameters
- unsigned int parameterIndex
¶void setParameterIndexLarge(
unsigned int parameterIndex)
void setParameterIndexLarge(
unsigned int parameterIndex)
Declared at: clang/include/clang/AST/Decl.h:1850
Parameters
- unsigned int parameterIndex
¶void setScopeInfo(unsigned int scopeDepth,
unsigned int parameterIndex)
void setScopeInfo(unsigned int scopeDepth,
unsigned int parameterIndex)
Declared at: clang/include/clang/AST/Decl.h:1713
Parameters
- unsigned int scopeDepth
- unsigned int parameterIndex
¶void setUninstantiatedDefaultArg(clang::Expr* arg)
void setUninstantiatedDefaultArg(clang::Expr* arg)
Declared at: clang/include/clang/AST/Decl.h:1778
Parameters
- clang::Expr* arg
¶void setUnparsedDefaultArg()
void setUnparsedDefaultArg()
Description
Specify that this parameter has an unparsed default argument. The argument will be replaced with a real default argument via setDefaultArg when the class definition enclosing the function declaration that owns this default argument is completed.
Declared at: clang/include/clang/AST/Decl.h:1809