clang 22.0.0git
clang::ParsedAttr Class Referencefinal

ParsedAttr - Represents a syntactic attribute. More...

#include "clang/Sema/ParsedAttr.h"

Inheritance diagram for clang::ParsedAttr:
[legend]

Public Member Functions

 ParsedAttr (const ParsedAttr &)=delete
 ParsedAttr (ParsedAttr &&)=delete
ParsedAttroperator= (const ParsedAttr &)=delete
ParsedAttroperator= (ParsedAttr &&)=delete
 ~ParsedAttr ()=delete
void operator delete (void *)=delete
bool hasParsedType () const
bool isDeclspecPropertyAttribute () const
 Is this the Microsoft __declspec(property) attribute?
bool isInvalid () const
void setInvalid (bool b=true) const
bool hasProcessingCache () const
unsigned getProcessingCache () const
void setProcessingCache (unsigned value) const
bool isUsedAsTypeAttr () const
void setUsedAsTypeAttr (bool Used=true)
bool isPragmaClangAttribute () const
 True if the attribute is specified using '#pragma clang attribute'.
void setIsPragmaClangAttribute ()
bool isPackExpansion () const
SourceLocation getEllipsisLoc () const
unsigned getNumArgs () const
 getNumArgs - Return the number of actual arguments to this attribute.
ArgsUnion getArg (unsigned Arg) const
 getArg - Return the specified argument.
bool isArgExpr (unsigned Arg) const
ExprgetArgAsExpr (unsigned Arg) const
bool isArgIdent (unsigned Arg) const
IdentifierLocgetArgAsIdent (unsigned Arg) const
const AvailabilityChangegetAvailabilityIntroduced () const
const AvailabilityChangegetAvailabilityDeprecated () const
const AvailabilityChangegetAvailabilityObsoleted () const
SourceLocation getStrictLoc () const
SourceLocation getUnavailableLoc () const
const ExprgetMessageExpr () const
const ExprgetReplacementExpr () const
const IdentifierLocgetEnvironment () const
const ParsedTypegetMatchingCType () const
bool getLayoutCompatible () const
bool getMustBeNull () const
const ParsedTypegetTypeArg () const
IdentifierInfogetPropertyDataGetter () const
IdentifierInfogetPropertyDataSetter () const
void setMacroIdentifier (IdentifierInfo *MacroName, SourceLocation Loc)
 Set the macro identifier info object that this parsed attribute was declared in if it was declared in a macro.
bool hasMacroIdentifier () const
 Returns true if this attribute was declared in a macro.
IdentifierInfogetMacroIdentifier () const
 Return the macro identifier if this attribute was declared in a macro.
SourceLocation getMacroExpansionLoc () const
bool checkExactlyNumArgs (class Sema &S, unsigned Num) const
 Check if the attribute has exactly as many args as Num.
bool checkAtLeastNumArgs (class Sema &S, unsigned Num) const
 Check if the attribute has at least as many args as Num.
bool checkAtMostNumArgs (class Sema &S, unsigned Num) const
 Check if the attribute has at most as many args as Num.
bool isTargetSpecificAttr () const
bool isTypeAttr () const
bool isStmtAttr () const
bool hasCustomParsing () const
bool acceptsExprPack () const
bool isParamExpr (size_t N) const
unsigned getMinArgs () const
unsigned getMaxArgs () const
unsigned getNumArgMembers () const
bool hasVariadicArg () const
void handleAttrWithDelayedArgs (Sema &S, Decl *D) const
bool diagnoseAppertainsTo (class Sema &S, const Decl *D) const
bool diagnoseAppertainsTo (class Sema &S, const Stmt *St) const
bool diagnoseMutualExclusion (class Sema &S, const Decl *D) const
bool diagnoseMutualExclusion (class Sema &S, const Stmt *St) const
bool appliesToDecl (const Decl *D, attr::SubjectMatchRule MatchRule) const
void getMatchRules (const LangOptions &LangOpts, SmallVectorImpl< std::pair< attr::SubjectMatchRule, bool > > &MatchRules) const
bool diagnoseLangOpts (class Sema &S) const
bool existsInTarget (const TargetInfo &Target) const
bool isKnownToGCC () const
bool isSupportedByPragmaAttribute () const
bool slidesFromDeclToDeclSpecLegacyBehavior () const
 Returns whether a [[]] attribute, if specified ahead of a declaration, should be applied to the decl-specifier-seq instead (i.e.
unsigned getSemanticSpelling () const
 If the parsed attribute has a semantic equivalent, and it would have a semantic Spelling enumeration (due to having semantically-distinct spelling variations), return the value of that semantic spelling.
LangAS asOpenCLLangAS () const
 If this is an OpenCL address space attribute, returns its representation in LangAS, otherwise returns default address space.
LangAS asSYCLLangAS () const
 If this is an OpenCL address space attribute, returns its SYCL representation in LangAS, otherwise returns default address space.
LangAS asHLSLLangAS () const
 If this is an HLSL address space attribute, returns its representation in LangAS, otherwise returns default address space.
AttributeCommonInfo::Kind getKind () const
const ParsedAttrInfogetInfo () const
Public Member Functions inherited from clang::AttributeCommonInfo
 AttributeCommonInfo (const IdentifierInfo *AttrName, AttributeScopeInfo AttrScope, SourceRange AttrRange, Kind AttrKind, Form FormUsed)
 AttributeCommonInfo (const IdentifierInfo *AttrName, AttributeScopeInfo Scope, SourceRange AttrRange, Form FormUsed)
 AttributeCommonInfo (const IdentifierInfo *AttrName, SourceRange AttrRange, Form FormUsed)
 AttributeCommonInfo (SourceRange AttrRange, Kind K, Form FormUsed)
 AttributeCommonInfo (SourceRange AttrRange, AttributeScopeInfo AttrScope, Kind K, Form FormUsed)
 AttributeCommonInfo (AttributeCommonInfo &&)=default
 AttributeCommonInfo (const AttributeCommonInfo &)=default
Kind getParsedKind () const
Syntax getSyntax () const
Form getForm () const
const IdentifierInfogetAttrName () const
void setAttrName (const IdentifierInfo *AttrNameII)
SourceLocation getLoc () const
SourceRange getRange () const
void setRange (SourceRange R)
bool hasScope () const
bool isExplicitScope () const
const IdentifierInfogetScopeName () const
SourceLocation getScopeLoc () const
std::string getNormalizedFullName () const
 Gets the normalized full name, which consists of both scope and name and with surrounding underscores removed as appropriate (e.g.
std::string getNormalizedFullName (StringRef ScopeName, StringRef AttrName) const
StringRef getNormalizedScopeName () const
StringRef getNormalizedAttrName (StringRef ScopeName) const
std::optional< StringRef > tryGetCorrectedScopeName (StringRef ScopeName) const
std::optional< StringRef > tryGetCorrectedAttrName (StringRef ScopeName, StringRef AttrName, const TargetInfo &Target, const LangOptions &LangOpts) const
SourceRange getNormalizedRange () const
bool isDeclspecAttribute () const
bool isMicrosoftAttribute () const
bool isGNUScope () const
bool isClangScope () const
bool isCXX11Attribute () const
bool isC23Attribute () const
bool isAlignas () const
bool isStandardAttributeSyntax () const
 The attribute is spelled [[]] in either C or C++ mode, including standard attributes spelled with a keyword, like alignas.
bool isGNUAttribute () const
bool isKeywordAttribute () const
bool isRegularKeywordAttribute () const
bool isContextSensitiveKeywordAttribute () const
unsigned getAttributeSpellingListIndex () const
void setAttributeSpellingListIndex (unsigned V)

Friends

class AttributeFactory
class AttributePool

Additional Inherited Members

Public Types inherited from clang::AttributeCommonInfo
enum  Syntax {
  AS_GNU = 1 , AS_CXX11 , AS_C23 , AS_Declspec ,
  AS_Microsoft , AS_Keyword , AS_Pragma , AS_ContextSensitiveKeyword ,
  AS_HLSLAnnotation , AS_Implicit
}
 The style used to specify an attribute. More...
enum  Kind { NoSemaHandlerAttribute , IgnoredAttribute , UnknownAttribute }
enum class  Scope {
  NONE , CLANG , GNU , MSVC ,
  OMP , HLSL , VK , GSL ,
  RISCV
}
enum class  AttrArgsInfo { None , Optional , Required }
Static Public Member Functions inherited from clang::AttributeCommonInfo
static Kind getParsedKind (const IdentifierInfo *Name, const IdentifierInfo *Scope, Syntax SyntaxUsed)
static AttrArgsInfo getCXX11AttrArgsInfo (const IdentifierInfo *Name)
Protected Member Functions inherited from clang::AttributeCommonInfo
bool isAttributeSpellingListCalculated () const
Static Protected Attributes inherited from clang::AttributeCommonInfo
static constexpr unsigned SpellingNotCalculated = 0xf

Detailed Description

ParsedAttr - Represents a syntactic attribute.

For a GNU attribute, there are four forms of this construct:

1: attribute(( const )). ParmName/Args/NumArgs will all be unused. 2: attribute(( mode(byte) )). ParmName used, Args/NumArgs unused. 3: attribute(( format(printf, 1, 2) )). ParmName/Args/NumArgs all used. 4: attribute(( aligned(16) )). ParmName is unused, Args/Num used.

Definition at line 115 of file ParsedAttr.h.

Constructor & Destructor Documentation

◆ ParsedAttr() [1/2]

clang::ParsedAttr::ParsedAttr ( const ParsedAttr & )
delete

◆ ParsedAttr() [2/2]

clang::ParsedAttr::ParsedAttr ( ParsedAttr && )
delete

◆ ~ParsedAttr()

clang::ParsedAttr::~ParsedAttr ( )
delete

Member Function Documentation

◆ acceptsExprPack()

bool ParsedAttr::acceptsExprPack ( ) const

Definition at line 250 of file ParsedAttr.cpp.

References clang::ParsedAttrInfo::AcceptsExprPack, and getInfo().

Referenced by MustDelayAttributeArguments().

◆ appliesToDecl()

bool ParsedAttr::appliesToDecl ( const Decl * D,
attr::SubjectMatchRule MatchRule ) const

Definition at line 164 of file ParsedAttr.cpp.

Referenced by clang::Sema::AddPragmaAttributes().

◆ asHLSLLangAS()

LangAS clang::ParsedAttr::asHLSLLangAS ( ) const
inline

If this is an HLSL address space attribute, returns its representation in LangAS, otherwise returns default address space.

Definition at line 601 of file ParsedAttr.h.

References clang::Default, clang::AttributeCommonInfo::getParsedKind(), and clang::hlsl_groupshared.

◆ asOpenCLLangAS()

LangAS clang::ParsedAttr::asOpenCLLangAS ( ) const
inline

If this is an OpenCL address space attribute, returns its representation in LangAS, otherwise returns default address space.

Definition at line 558 of file ParsedAttr.h.

References clang::Default, clang::AttributeCommonInfo::getParsedKind(), clang::opencl_constant, clang::opencl_generic, clang::opencl_global, clang::opencl_global_device, clang::opencl_global_host, clang::opencl_local, and clang::opencl_private.

◆ asSYCLLangAS()

LangAS clang::ParsedAttr::asSYCLLangAS ( ) const
inline

If this is an OpenCL address space attribute, returns its SYCL representation in LangAS, otherwise returns default address space.

Definition at line 581 of file ParsedAttr.h.

References clang::Default, getKind(), clang::sycl_global, clang::sycl_global_device, clang::sycl_global_host, clang::sycl_local, and clang::sycl_private.

◆ checkAtLeastNumArgs()

◆ checkAtMostNumArgs()

bool ParsedAttr::checkAtMostNumArgs ( class Sema & S,
unsigned Num ) const

◆ checkExactlyNumArgs()

◆ diagnoseAppertainsTo() [1/2]

bool ParsedAttr::diagnoseAppertainsTo ( class Sema & S,
const Decl * D ) const

◆ diagnoseAppertainsTo() [2/2]

bool ParsedAttr::diagnoseAppertainsTo ( class Sema & S,
const Stmt * St ) const

Definition at line 156 of file ParsedAttr.cpp.

References clang::ParsedAttrInfo::diagAppertainsToStmt(), and getInfo().

◆ diagnoseLangOpts()

bool ParsedAttr::diagnoseLangOpts ( class Sema & S) const

◆ diagnoseMutualExclusion() [1/2]

bool ParsedAttr::diagnoseMutualExclusion ( class Sema & S,
const Decl * D ) const

◆ diagnoseMutualExclusion() [2/2]

bool clang::ParsedAttr::diagnoseMutualExclusion ( class Sema & S,
const Stmt * St ) const
inline

Definition at line 525 of file ParsedAttr.h.

◆ existsInTarget()

◆ getArg()

ArgsUnion clang::ParsedAttr::getArg ( unsigned Arg) const
inline

getArg - Return the specified argument.

Definition at line 374 of file ParsedAttr.h.

Referenced by getArgAsExpr(), getArgAsIdent(), handleDiagnoseAsBuiltinAttr(), isArgExpr(), and isArgIdent().

◆ getArgAsExpr()

Expr * clang::ParsedAttr::getArgAsExpr ( unsigned Arg) const
inline

Definition at line 383 of file ParsedAttr.h.

References clang::cast(), and getArg().

Referenced by clang::Sema::ActOnCXXAssumeAttr(), checkAttrArgsAreCapabilityObjs(), clang::Sema::CheckCallingConvAttr(), checkFunctionConditionAttr(), clang::Sema::CheckRegparmAttr(), clang::Sema::checkStringLiteralArgumentAttr(), checkTryLockFunAttrCommon(), clang::Sema::CreateAnnotationAttr(), handleAlignedAttr(), handleAlignValueAttr(), handleAllocAlignAttr(), handleAllocSizeAttr(), clang::SemaAMDGPU::handleAMDGPUFlatWorkGroupSizeAttr(), clang::SemaAMDGPU::handleAMDGPUMaxNumWorkGroupsAttr(), clang::SemaAMDGPU::handleAMDGPUNumSGPRAttr(), clang::SemaAMDGPU::handleAMDGPUNumVGPRAttr(), clang::SemaAMDGPU::handleAMDGPUWavesPerEUAttr(), HandleAnnotateTypeAttr(), handleArgumentWithTypeTagAttr(), handleAssumeAlignedAttr(), clang::SemaSwift::handleAsyncAttr(), clang::SemaSwift::handleAsyncError(), handleAtomicAttr(), handleCallbackAttr(), handleCallConvAttr(), handleCleanupAttr(), handleCodeAlignAttr(), handleCountedByAttrField(), handleDeprecatedAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), handleExternalSourceSymbolAttr(), handleFormatArgAttr(), handleFormatAttr(), handleFormatAttrCommon(), handleFormatMatchesAttr(), handleHLSLLoopHintAttr(), handleInitPriorityAttr(), clang::SemaM68k::handleInterruptAttr(), clang::SemaMSP430::handleInterruptAttr(), handleLaunchBoundsAttr(), handleLayoutVersion(), handleLoopHintAttr(), handleMinVectorWidthAttr(), handleNonBlockingNonAllocatingTypeAttr(), handleNonNullAttr(), clang::SemaHLSL::handleNumThreadsAttr(), handleOpenCLUnrollHint(), handleOwnershipAttr(), clang::SemaHLSL::handlePackOffsetAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), handleRestrictAttr(), clang::SemaHLSL::handleSemanticAttr(), handleSentinelAttr(), clang::SemaOpenCL::handleSubGroupSize(), handleTryAcquireCapabilityAttr(), clang::SemaHLSL::handleVkBindingAttr(), clang::SemaHLSL::handleVkConstantIdAttr(), clang::SemaHLSL::handleVkExtBuiltinInputAttr(), handleVTablePointerAuthentication(), clang::SemaHLSL::handleWaveSizeAttr(), handleWorkGroupSize(), handleXRayLogArgsAttr(), MustDelayAttributeArguments(), clang::Sema::ParseLifetimeCaptureByAttr(), and sharedGetConstructorDestructorAttrExpr().

◆ getArgAsIdent()

◆ getAvailabilityDeprecated()

const AvailabilityChange & clang::ParsedAttr::getAvailabilityDeprecated ( ) const
inline

◆ getAvailabilityIntroduced()

const AvailabilityChange & clang::ParsedAttr::getAvailabilityIntroduced ( ) const
inline

◆ getAvailabilityObsoleted()

const AvailabilityChange & clang::ParsedAttr::getAvailabilityObsoleted ( ) const
inline

◆ getEllipsisLoc()

SourceLocation clang::ParsedAttr::getEllipsisLoc ( ) const
inline

Definition at line 368 of file ParsedAttr.h.

Referenced by handleAlignedAttr().

◆ getEnvironment()

const IdentifierLoc * clang::ParsedAttr::getEnvironment ( ) const
inline

Definition at line 435 of file ParsedAttr.h.

References clang::AttributeCommonInfo::getParsedKind().

Referenced by handleAvailabilityAttr().

◆ getInfo()

◆ getKind()

◆ getLayoutCompatible()

bool clang::ParsedAttr::getLayoutCompatible ( ) const
inline

Definition at line 447 of file ParsedAttr.h.

References clang::AttributeCommonInfo::getParsedKind().

Referenced by handleTypeTagForDatatypeAttr().

◆ getMacroExpansionLoc()

SourceLocation clang::ParsedAttr::getMacroExpansionLoc ( ) const
inline

Definition at line 491 of file ParsedAttr.h.

References hasMacroIdentifier().

◆ getMacroIdentifier()

IdentifierInfo * clang::ParsedAttr::getMacroIdentifier ( ) const
inline

Return the macro identifier if this attribute was declared in a macro.

nullptr is returned if it was not declared in a macro.

Definition at line 489 of file ParsedAttr.h.

◆ getMatchingCType()

const ParsedType & clang::ParsedAttr::getMatchingCType ( ) const
inline

Definition at line 441 of file ParsedAttr.h.

References clang::AttributeCommonInfo::getParsedKind().

Referenced by handleTypeTagForDatatypeAttr().

◆ getMatchRules()

void ParsedAttr::getMatchRules ( const LangOptions & LangOpts,
SmallVectorImpl< std::pair< attr::SubjectMatchRule, bool > > & MatchRules ) const

◆ getMaxArgs()

unsigned ParsedAttr::getMaxArgs ( ) const

Definition at line 140 of file ParsedAttr.cpp.

References getInfo(), getMinArgs(), and clang::ParsedAttrInfo::OptArgs.

Referenced by checkCommonAttributeFeatures().

◆ getMessageExpr()

const Expr * clang::ParsedAttr::getMessageExpr ( ) const
inline

Definition at line 423 of file ParsedAttr.h.

References clang::AttributeCommonInfo::getParsedKind().

Referenced by handleAvailabilityAttr().

◆ getMinArgs()

unsigned ParsedAttr::getMinArgs ( ) const

◆ getMustBeNull()

bool clang::ParsedAttr::getMustBeNull ( ) const
inline

Definition at line 453 of file ParsedAttr.h.

References clang::AttributeCommonInfo::getParsedKind().

Referenced by handleTypeTagForDatatypeAttr().

◆ getNumArgMembers()

unsigned ParsedAttr::getNumArgMembers ( ) const

Definition at line 144 of file ParsedAttr.cpp.

References getInfo(), and clang::ParsedAttrInfo::NumArgMembers.

Referenced by MustDelayAttributeArguments().

◆ getNumArgs()

unsigned clang::ParsedAttr::getNumArgs ( ) const
inline

getNumArgs - Return the number of actual arguments to this attribute.

Definition at line 371 of file ParsedAttr.h.

Referenced by clang::Sema::ActOnCXXAssumeAttr(), checkAttrArgsAreCapabilityObjs(), clang::Sema::CheckCallingConvAttr(), clang::Sema::CreateAnnotationAttr(), getNumAttributeArgs(), getNumAttributeArgs(), handleAbiTagAttr(), handleAlignedAttr(), handleAllocSizeAttr(), clang::SemaAMDGPU::handleAMDGPUMaxNumWorkGroupsAttr(), clang::SemaAMDGPU::handleAMDGPUWavesPerEUAttr(), HandleAnnotateTypeAttr(), handleAssumeAlignedAttr(), handleAtomicAttr(), handleAttrWithMessage(), handleCallableWhenAttr(), handleCallbackAttr(), handleCallConvAttr(), handleConstructorAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), handleHLSLLoopHintAttr(), clang::SemaObjC::handleIBOutletCollection(), clang::SemaARM::handleInterruptAttr(), clang::SemaMIPS::handleInterruptAttr(), clang::SemaRISCV::handleInterruptAttr(), handleLaunchBoundsAttr(), clang::SemaARM::handleNewAttr(), handleNoBuiltinAttr(), handleNonBlockingNonAllocatingTypeAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoSanitizeAttr(), handleNoSpecializations(), handleOpenCLUnrollHint(), handleOwnershipAttr(), handlePatchableFunctionEntryAttr(), clang::SemaHLSL::handleResourceBindingAttr(), clang::SemaHLSL::handleResourceTypeAttr(), handleRestrictAttr(), clang::SemaHLSL::handleRootSignatureAttr(), handleSentinelAttr(), handleSuppressAttr(), handleSuppressAttr(), handleTargetClonesAttr(), clang::SemaHLSL::handleVkBindingAttr(), handleVTablePointerAuthentication(), handleWarnUnusedResult(), clang::SemaHLSL::handleWaveSizeAttr(), handleWeakRefAttr(), MustDelayAttributeArguments(), clang::Sema::ParseLifetimeCaptureByAttr(), and sharedGetConstructorDestructorAttrExpr().

◆ getProcessingCache()

unsigned clang::ParsedAttr::getProcessingCache ( ) const
inline

Definition at line 349 of file ParsedAttr.h.

References hasProcessingCache().

Referenced by clang::Sema::CheckCallingConvAttr().

◆ getPropertyDataGetter()

IdentifierInfo * clang::ParsedAttr::getPropertyDataGetter ( ) const
inline

Definition at line 464 of file ParsedAttr.h.

References isDeclspecPropertyAttribute().

Referenced by clang::Sema::HandleMSProperty().

◆ getPropertyDataSetter()

IdentifierInfo * clang::ParsedAttr::getPropertyDataSetter ( ) const
inline

Definition at line 470 of file ParsedAttr.h.

References isDeclspecPropertyAttribute().

Referenced by clang::Sema::HandleMSProperty().

◆ getReplacementExpr()

const Expr * clang::ParsedAttr::getReplacementExpr ( ) const
inline

Definition at line 429 of file ParsedAttr.h.

References clang::AttributeCommonInfo::getParsedKind().

Referenced by handleAvailabilityAttr().

◆ getSemanticSpelling()

unsigned ParsedAttr::getSemanticSpelling ( ) const

If the parsed attribute has a semantic equivalent, and it would have a semantic Spelling enumeration (due to having semantically-distinct spelling variations), return the value of that semantic spelling.

If the parsed attribute does not have a semantic equivalent, or would not have a Spelling enumeration, the value UINT_MAX is returned.

Definition at line 252 of file ParsedAttr.cpp.

References getInfo(), and clang::ParsedAttrInfo::spellingIndexToSemanticSpelling().

Referenced by clang::SemaOpenCL::handleAccessAttr(), handleHLSLLoopHintAttr(), handleMSInheritanceAttr(), clang::SemaHLSL::handleParamModifierAttr(), and handleStandardNoReturnAttr().

◆ getStrictLoc()

SourceLocation clang::ParsedAttr::getStrictLoc ( ) const
inline

Definition at line 411 of file ParsedAttr.h.

References clang::AttributeCommonInfo::getParsedKind().

Referenced by handleAvailabilityAttr().

◆ getTypeArg()

◆ getUnavailableLoc()

SourceLocation clang::ParsedAttr::getUnavailableLoc ( ) const
inline

Definition at line 417 of file ParsedAttr.h.

References clang::AttributeCommonInfo::getParsedKind().

Referenced by handleAvailabilityAttr().

◆ handleAttrWithDelayedArgs()

void ParsedAttr::handleAttrWithDelayedArgs ( Sema & S,
Decl * D ) const

Definition at line 268 of file ParsedAttr.cpp.

References handleAttrWithDelayedArgs().

Referenced by handleAttrWithDelayedArgs(), and ProcessDeclAttribute().

◆ hasCustomParsing()

bool ParsedAttr::hasCustomParsing ( ) const

Definition at line 148 of file ParsedAttr.cpp.

References getInfo(), and clang::ParsedAttrInfo::HasCustomParsing.

Referenced by checkCommonAttributeFeatures().

◆ hasMacroIdentifier()

bool clang::ParsedAttr::hasMacroIdentifier ( ) const
inline

Returns true if this attribute was declared in a macro.

Definition at line 485 of file ParsedAttr.h.

Referenced by getMacroExpansionLoc().

◆ hasParsedType()

◆ hasProcessingCache()

bool clang::ParsedAttr::hasProcessingCache ( ) const
inline

Definition at line 347 of file ParsedAttr.h.

Referenced by clang::Sema::CheckCallingConvAttr(), and getProcessingCache().

◆ hasVariadicArg()

bool ParsedAttr::hasVariadicArg ( ) const

◆ isArgExpr()

◆ isArgIdent()

◆ isDeclspecPropertyAttribute()

bool clang::ParsedAttr::isDeclspecPropertyAttribute ( ) const
inline

Is this the Microsoft __declspec(property) attribute?

Definition at line 340 of file ParsedAttr.h.

Referenced by clang::ParsedAttributesView::getMSPropertyAttr(), getPropertyDataGetter(), and getPropertyDataSetter().

◆ isInvalid()

◆ isKnownToGCC()

bool ParsedAttr::isKnownToGCC ( ) const

Definition at line 206 of file ParsedAttr.cpp.

References getInfo(), and clang::ParsedAttrInfo::IsKnownToGCC.

◆ isPackExpansion()

bool clang::ParsedAttr::isPackExpansion ( ) const
inline

Definition at line 367 of file ParsedAttr.h.

Referenced by handleAlignedAttr().

◆ isParamExpr()

bool ParsedAttr::isParamExpr ( size_t N) const

Definition at line 264 of file ParsedAttr.cpp.

References getInfo(), and clang::ParsedAttrInfo::isParamExpr().

Referenced by MustDelayAttributeArguments().

◆ isPragmaClangAttribute()

bool clang::ParsedAttr::isPragmaClangAttribute ( ) const
inline

True if the attribute is specified using '#pragma clang attribute'.

Definition at line 363 of file ParsedAttr.h.

Referenced by clang::Sema::AddPragmaAttributes(), and handleAvailabilityAttr().

◆ isStmtAttr()

bool ParsedAttr::isStmtAttr ( ) const

Definition at line 189 of file ParsedAttr.cpp.

References getInfo(), and clang::ParsedAttrInfo::IsStmt.

Referenced by ProcessDeclAttribute().

◆ isSupportedByPragmaAttribute()

bool ParsedAttr::isSupportedByPragmaAttribute ( ) const

◆ isTargetSpecificAttr()

bool ParsedAttr::isTargetSpecificAttr ( ) const

Definition at line 183 of file ParsedAttr.cpp.

References getInfo(), and clang::ParsedAttrInfo::IsTargetSpecific.

◆ isTypeAttr()

bool ParsedAttr::isTypeAttr ( ) const

Definition at line 187 of file ParsedAttr.cpp.

References getInfo(), and clang::ParsedAttrInfo::IsType.

Referenced by ProcessDeclAttribute().

◆ isUsedAsTypeAttr()

◆ operator delete()

void clang::ParsedAttr::operator delete ( void * )
delete

◆ operator=() [1/2]

ParsedAttr & clang::ParsedAttr::operator= ( const ParsedAttr & )
delete

◆ operator=() [2/2]

ParsedAttr & clang::ParsedAttr::operator= ( ParsedAttr && )
delete

◆ setInvalid()

◆ setIsPragmaClangAttribute()

void clang::ParsedAttr::setIsPragmaClangAttribute ( )
inline

Definition at line 365 of file ParsedAttr.h.

Referenced by clang::Sema::ActOnPragmaAttributeAttribute().

◆ setMacroIdentifier()

void clang::ParsedAttr::setMacroIdentifier ( IdentifierInfo * MacroName,
SourceLocation Loc )
inline

Set the macro identifier info object that this parsed attribute was declared in if it was declared in a macro.

Also set the expansion location of the macro.

Definition at line 479 of file ParsedAttr.h.

◆ setProcessingCache()

void clang::ParsedAttr::setProcessingCache ( unsigned value) const
inline

Definition at line 354 of file ParsedAttr.h.

Referenced by clang::Sema::CheckCallingConvAttr().

◆ setUsedAsTypeAttr()

void clang::ParsedAttr::setUsedAsTypeAttr ( bool Used = true)
inline

Definition at line 360 of file ParsedAttr.h.

References Used.

Referenced by createSimpleAttr(), and HandleSwiftAttr().

◆ slidesFromDeclToDeclSpecLegacyBehavior()

bool ParsedAttr::slidesFromDeclToDeclSpecLegacyBehavior ( ) const

Returns whether a [[]] attribute, if specified ahead of a declaration, should be applied to the decl-specifier-seq instead (i.e.

whether it "slides" to the decl-specifier-seq).

By the standard, attributes specified before the declaration always appertain to the declaration, but historically we have allowed some of these attributes to slide to the decl-specifier-seq, so we need to keep supporting this behavior.

This may only be called if isStandardAttributeSyntax() returns true.

Definition at line 212 of file ParsedAttr.cpp.

References clang::AttributeCommonInfo::getParsedKind(), clang::AttributeCommonInfo::isAlignas(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::AttributeCommonInfo::isStandardAttributeSyntax().

Referenced by ProcessDeclAttribute().

◆ AttributeFactory

friend class AttributeFactory
friend

Definition at line 202 of file ParsedAttr.h.

References AttributeFactory.

Referenced by AttributeFactory.

◆ AttributePool

friend class AttributePool
friend

Definition at line 203 of file ParsedAttr.h.

References clang::AttributeCommonInfo::AttributeCommonInfo(), AttributePool, and false.

Referenced by AttributePool.


The documentation for this class was generated from the following files: