clang 20.0.0git
|
ParsedAttr - Represents a syntactic attribute. More...
#include "clang/Sema/ParsedAttr.h"
Public Member Functions | |
ParsedAttr (const ParsedAttr &)=delete | |
ParsedAttr (ParsedAttr &&)=delete | |
ParsedAttr & | operator= (const ParsedAttr &)=delete |
ParsedAttr & | operator= (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 |
Expr * | getArgAsExpr (unsigned Arg) const |
bool | isArgIdent (unsigned Arg) const |
IdentifierLoc * | getArgAsIdent (unsigned Arg) const |
const AvailabilityChange & | getAvailabilityIntroduced () const |
const AvailabilityChange & | getAvailabilityDeprecated () const |
const AvailabilityChange & | getAvailabilityObsoleted () const |
SourceLocation | getStrictLoc () const |
SourceLocation | getUnavailableLoc () const |
const Expr * | getMessageExpr () const |
const Expr * | getReplacementExpr () const |
const IdentifierLoc * | getEnvironment () const |
const ParsedType & | getMatchingCType () const |
bool | getLayoutCompatible () const |
bool | getMustBeNull () const |
const ParsedType & | getTypeArg () const |
IdentifierInfo * | getPropertyDataGetter () const |
IdentifierInfo * | getPropertyDataSetter () 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. | |
IdentifierInfo * | getMacroIdentifier () 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 ParsedAttrInfo & | getInfo () const |
Public Member Functions inherited from clang::AttributeCommonInfo | |
AttributeCommonInfo (const IdentifierInfo *AttrName, const IdentifierInfo *ScopeName, SourceRange AttrRange, SourceLocation ScopeLoc, Kind AttrKind, Form FormUsed) | |
AttributeCommonInfo (const IdentifierInfo *AttrName, const IdentifierInfo *ScopeName, SourceRange AttrRange, SourceLocation ScopeLoc, Form FormUsed) | |
AttributeCommonInfo (const IdentifierInfo *AttrName, SourceRange AttrRange, Form FormUsed) | |
AttributeCommonInfo (SourceRange AttrRange, Kind K, Form FormUsed) | |
AttributeCommonInfo (AttributeCommonInfo &&)=default | |
AttributeCommonInfo (const AttributeCommonInfo &)=default | |
Kind | getParsedKind () const |
Syntax | getSyntax () const |
Form | getForm () const |
const IdentifierInfo * | getAttrName () const |
void | setAttrName (const IdentifierInfo *AttrNameII) |
SourceLocation | getLoc () const |
SourceRange | getRange () const |
void | setRange (SourceRange R) |
bool | hasScope () const |
const IdentifierInfo * | getScopeName () 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. | |
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 , GSL , RISCV } |
Static Public Member Functions inherited from clang::AttributeCommonInfo | |
static Kind | getParsedKind (const IdentifierInfo *Name, const IdentifierInfo *Scope, Syntax SyntaxUsed) |
Protected Member Functions inherited from clang::AttributeCommonInfo | |
bool | isAttributeSpellingListCalculated () const |
Static Protected Attributes inherited from clang::AttributeCommonInfo | |
static constexpr unsigned | SpellingNotCalculated = 0xf |
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 125 of file ParsedAttr.h.
|
delete |
|
delete |
|
delete |
bool ParsedAttr::acceptsExprPack | ( | ) | const |
Definition at line 258 of file ParsedAttr.cpp.
References clang::ParsedAttrInfo::AcceptsExprPack, and getInfo().
Referenced by MustDelayAttributeArguments().
bool ParsedAttr::appliesToDecl | ( | const Decl * | D, |
attr::SubjectMatchRule | MatchRule | ||
) | const |
Definition at line 172 of file ParsedAttr.cpp.
References D.
Referenced by clang::Sema::AddPragmaAttributes().
|
inline |
If this is an HLSL address space attribute, returns its representation in LangAS, otherwise returns default address space.
Definition at line 616 of file ParsedAttr.h.
|
inline |
If this is an OpenCL address space attribute, returns its representation in LangAS, otherwise returns default address space.
Definition at line 573 of file ParsedAttr.h.
|
inline |
If this is an OpenCL address space attribute, returns its SYCL representation in LangAS, otherwise returns default address space.
Definition at line 596 of file ParsedAttr.h.
References getKind().
Check if the attribute has at least as many args as Num.
May output an error. Returns false if a diagnostic is produced.
Definition at line 301 of file ParsedAttr.cpp.
References checkAttributeNumArgsImpl(), and clang::Num.
Referenced by checkAcquireOrderAttrCommon(), checkCommonAttributeFeatures(), checkTryLockFunAttrCommon(), handleAbiTagAttr(), handleAllocSizeAttr(), clang::SemaAMDGPU::handleAMDGPUWavesPerEUAttr(), handleCallableWhenAttr(), handleCPUSpecificAttr(), handleExternalSourceSymbolAttr(), handleLaunchBoundsAttr(), handleLocksExcludedAttr(), handleNoSanitizeAttr(), handleRequiresCapabilityAttr(), and handleSuppressAttr().
Check if the attribute has at most as many args as Num.
May output an error. Returns false if a diagnostic is produced.
Definition at line 306 of file ParsedAttr.cpp.
References checkAttributeNumArgsImpl(), and clang::Num.
Referenced by checkCommonAttributeFeatures(), handleAllocSizeAttr(), clang::SemaAMDGPU::handleAMDGPUWavesPerEUAttr(), handleDeprecatedAttr(), handleExternalSourceSymbolAttr(), handleHLSLLoopHintAttr(), clang::SemaRISCV::handleInterruptAttr(), handleLaunchBoundsAttr(), and handleNonBlockingNonAllocatingTypeAttr().
Check if the attribute has exactly as many args as Num.
May output an error. Returns false if a diagnostic is produced.
Definition at line 296 of file ParsedAttr.cpp.
References checkAttributeNumArgsImpl(), and clang::Num.
Referenced by clang::Sema::CheckAttrNoArgs(), clang::Sema::CheckCallingConvAttr(), checkCommonAttributeFeatures(), clang::Sema::CheckRegparmAttr(), clang::SemaSwift::handleAsyncAttr(), clang::SemaSwift::handleAsyncError(), handleAvailabilityAttr(), clang::SemaAVR::handleInterruptAttr(), clang::SemaM68k::handleInterruptAttr(), clang::SemaMSP430::handleInterruptAttr(), clang::SemaSwift::handleNewType(), clang::SemaHLSL::handleResourceTypeAttr(), clang::SemaAVR::handleSignalAttr(), and handleTypeTagForDatatypeAttr().
Definition at line 160 of file ParsedAttr.cpp.
References D, clang::ParsedAttrInfo::diagAppertainsToDecl(), and getInfo().
Referenced by checkCommonAttributeFeatures().
Definition at line 164 of file ParsedAttr.cpp.
References clang::ParsedAttrInfo::diagAppertainsToStmt(), and getInfo().
Definition at line 184 of file ParsedAttr.cpp.
References clang::SemaBase::Diag(), getInfo(), clang::Sema::getLangOpts(), and clang::AttributeCommonInfo::getLoc().
Referenced by checkCommonAttributeFeatures().
Definition at line 168 of file ParsedAttr.cpp.
References D, clang::ParsedAttrInfo::diagMutualExclusion(), and getInfo().
Referenced by checkCommonAttributeFeatures().
Definition at line 540 of file ParsedAttr.h.
bool ParsedAttr::existsInTarget | ( | const TargetInfo & | Target | ) | const |
Definition at line 199 of file ParsedAttr.cpp.
References clang::ParsedAttrInfo::existsInTarget(), clang::AttributeCommonInfo::getAttributeSpellingListIndex(), getInfo(), clang::AttributeCommonInfo::getParsedKind(), clang::AttributeCommonInfo::IgnoredAttribute, clang::AttributeCommonInfo::NoSemaHandlerAttribute, clang::ParsedAttrInfo::spellingExistsInTarget(), and clang::AttributeCommonInfo::UnknownAttribute.
Referenced by clang::Sema::CheckAttrTarget(), ProcessDeclAttribute(), and ProcessStmtAttribute().
getArg - Return the specified argument.
Definition at line 389 of file ParsedAttr.h.
Referenced by handleDiagnoseAsBuiltinAttr().
Definition at line 398 of file ParsedAttr.h.
Referenced by clang::Sema::ActOnCXXAssumeAttr(), checkAttrArgsAreCapabilityObjs(), 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(), handleCallbackAttr(), handleCleanupAttr(), handleCodeAlignAttr(), handleConstructorAttr(), handleCountedByAttrField(), handleDeprecatedAttr(), handleDestructorAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), handleExclusiveTrylockFunctionAttr(), handleExternalSourceSymbolAttr(), handleFormatArgAttr(), handleFormatAttr(), handleHLSLLoopHintAttr(), handleInitPriorityAttr(), clang::SemaM68k::handleInterruptAttr(), clang::SemaMSP430::handleInterruptAttr(), handleLaunchBoundsAttr(), handleLayoutVersion(), handleLoopHintAttr(), handleMinVectorWidthAttr(), handleNonBlockingNonAllocatingTypeAttr(), handleNonNullAttr(), clang::SemaHLSL::handleNumThreadsAttr(), handleOpenCLUnrollHint(), handleOwnershipAttr(), clang::SemaHLSL::handlePackOffsetAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), handleSentinelAttr(), handleSharedTrylockFunctionAttr(), clang::SemaOpenCL::handleSubGroupSize(), handleTargetClonesAttr(), handleTryAcquireCapabilityAttr(), handleVTablePointerAuthentication(), clang::SemaHLSL::handleWaveSizeAttr(), handleWorkGroupSize(), handleXRayLogArgsAttr(), MustDelayAttributeArguments(), and clang::Sema::ParseLifetimeCaptureByAttr().
|
inline |
Definition at line 404 of file ParsedAttr.h.
Referenced by clang::Sema::checkStringLiteralArgumentAttr(), handleArgumentWithTypeTagAttr(), clang::SemaSwift::handleAsyncAttr(), clang::SemaSwift::handleAsyncError(), handleAvailabilityAttr(), clang::SemaObjC::handleBlocksAttr(), clang::SemaObjC::handleBridgeAttr(), clang::SemaObjC::handleBridgeMutableAttr(), clang::SemaObjC::handleBridgeRelatedAttr(), clang::SemaARM::handleBuiltinAliasAttr(), handleBuiltinAliasAttr(), handleCallableWhenAttr(), handleCallbackAttr(), handleCFGuardAttr(), handleConsumableAttr(), handleCPUSpecificAttr(), handleEnumExtensibilityAttr(), clang::SemaSwift::handleError(), handleExternalSourceSymbolAttr(), handleFormatAttr(), handleLoopHintAttr(), clang::SemaObjC::handleMethodFamilyAttr(), handleModeAttr(), clang::SemaSwift::handleNewType(), handleOwnershipAttr(), handleParamTypestateAttr(), clang::SemaHLSL::handleResourceBindingAttr(), clang::SemaHLSL::handleResourceTypeAttr(), handleReturnTypestateAttr(), handleSetTypestateAttr(), handleTestTypestateAttr(), handleTypeTagForDatatypeAttr(), handleVTablePointerAuthentication(), and clang::Sema::ParseLifetimeCaptureByAttr().
|
inline |
Definition at line 414 of file ParsedAttr.h.
Referenced by handleAvailabilityAttr().
|
inline |
Definition at line 408 of file ParsedAttr.h.
Referenced by handleAvailabilityAttr().
|
inline |
Definition at line 420 of file ParsedAttr.h.
Referenced by handleAvailabilityAttr().
|
inline |
Definition at line 383 of file ParsedAttr.h.
Referenced by handleAlignedAttr().
|
inline |
Definition at line 450 of file ParsedAttr.h.
Referenced by handleAvailabilityAttr().
|
inline |
Definition at line 628 of file ParsedAttr.h.
Referenced by acceptsExprPack(), diagnoseAppertainsTo(), diagnoseLangOpts(), diagnoseMutualExclusion(), existsInTarget(), getMatchRules(), getMaxArgs(), getMinArgs(), getNumArgMembers(), getSemanticSpelling(), hasCustomParsing(), hasVariadicArg(), isKnownToGCC(), isParamExpr(), isStmtAttr(), isSupportedByPragmaAttribute(), isTargetSpecificAttr(), isTypeAttr(), ProcessDeclAttribute(), and ProcessStmtAttribute().
|
inline |
Definition at line 625 of file ParsedAttr.h.
References clang::ParsedAttrInfo::AttrKind.
Referenced by clang::Sema::CheckCallingConvAttr(), checkCommonAttributeFeatures(), handleCallConvAttr(), handleCapabilityAttr(), handleCountedByAttrField(), handleCPUSpecificAttr(), handleDestroyAttr(), handleDLLAttr(), handleGlobalAttr(), handleLifetimeCategoryAttr(), handleMSPointerTypeQualifierAttr(), handleNonBlockingNonAllocatingTypeAttr(), clang::SemaHLSL::handleResourceTypeAttr(), HandleWebAssemblyFuncrefAttr(), clang::SemaObjC::handleXReturnsXRetainedAttr(), clang::SemaObjC::parsedAttrToRetainOwnershipKind(), ProcessDeclAttribute(), and ProcessStmtAttribute().
|
inline |
Definition at line 462 of file ParsedAttr.h.
Referenced by handleTypeTagForDatatypeAttr().
|
inline |
Definition at line 506 of file ParsedAttr.h.
|
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 504 of file ParsedAttr.h.
|
inline |
Definition at line 456 of file ParsedAttr.h.
Referenced by handleTypeTagForDatatypeAttr().
void ParsedAttr::getMatchRules | ( | const LangOptions & | LangOpts, |
SmallVectorImpl< std::pair< attr::SubjectMatchRule, bool > > & | MatchRules | ||
) | const |
Definition at line 177 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::getPragmaAttributeMatchRules().
Referenced by clang::Sema::ActOnPragmaAttributeAttribute().
unsigned ParsedAttr::getMaxArgs | ( | ) | const |
Definition at line 148 of file ParsedAttr.cpp.
References getInfo(), getMinArgs(), and clang::ParsedAttrInfo::OptArgs.
Referenced by checkCommonAttributeFeatures().
|
inline |
Definition at line 438 of file ParsedAttr.h.
Referenced by handleAvailabilityAttr().
unsigned ParsedAttr::getMinArgs | ( | ) | const |
Definition at line 146 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::NumArgs.
Referenced by checkCommonAttributeFeatures(), getMaxArgs(), and clang::SemaHLSL::handleResourceTypeAttr().
|
inline |
Definition at line 468 of file ParsedAttr.h.
Referenced by handleTypeTagForDatatypeAttr().
unsigned ParsedAttr::getNumArgMembers | ( | ) | const |
Definition at line 152 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::NumArgMembers.
Referenced by MustDelayAttributeArguments().
|
inline |
getNumArgs - Return the number of actual arguments to this attribute.
Definition at line 386 of file ParsedAttr.h.
Referenced by clang::Sema::ActOnCXXAssumeAttr(), checkAttrArgsAreCapabilityObjs(), clang::Sema::CreateAnnotationAttr(), getNumAttributeArgs(), handleAbiTagAttr(), handleAlignedAttr(), handleAllocSizeAttr(), clang::SemaAMDGPU::handleAMDGPUMaxNumWorkGroupsAttr(), clang::SemaAMDGPU::handleAMDGPUWavesPerEUAttr(), HandleAnnotateTypeAttr(), handleAssumeAlignedAttr(), handleAttrWithMessage(), handleCallableWhenAttr(), handleCallbackAttr(), handleConstructorAttr(), handleDestructorAttr(), handleDiagnoseAsBuiltinAttr(), 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(), handleSentinelAttr(), handleSuppressAttr(), handleTargetClonesAttr(), handleVTablePointerAuthentication(), handleWarnUnusedResult(), clang::SemaHLSL::handleWaveSizeAttr(), handleWeakRefAttr(), MustDelayAttributeArguments(), and clang::Sema::ParseLifetimeCaptureByAttr().
|
inline |
Definition at line 364 of file ParsedAttr.h.
Referenced by clang::Sema::CheckCallingConvAttr().
|
inline |
Definition at line 479 of file ParsedAttr.h.
Referenced by clang::Sema::HandleMSProperty().
|
inline |
Definition at line 485 of file ParsedAttr.h.
Referenced by clang::Sema::HandleMSProperty().
|
inline |
Definition at line 444 of file ParsedAttr.h.
Referenced by handleAvailabilityAttr().
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 260 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::spellingIndexToSemanticSpelling().
Referenced by clang::SemaOpenCL::handleAccessAttr(), handleHLSLLoopHintAttr(), handleMSInheritanceAttr(), clang::SemaHLSL::handleParamModifierAttr(), and handleStandardNoReturnAttr().
|
inline |
Definition at line 426 of file ParsedAttr.h.
Referenced by handleAvailabilityAttr().
|
inline |
Definition at line 474 of file ParsedAttr.h.
Referenced by handleAlignedAttr(), clang::SemaObjC::handleIBOutletCollection(), clang::SemaSYCL::handleKernelEntryPointAttr(), handleLifetimeCategoryAttr(), handlePreferredName(), handlePreferredTypeAttr(), clang::SemaHLSL::handleResourceTypeAttr(), and handleVecTypeHint().
|
inline |
Definition at line 432 of file ParsedAttr.h.
Referenced by handleAvailabilityAttr().
Definition at line 276 of file ParsedAttr.cpp.
References D, and handleAttrWithDelayedArgs().
Referenced by handleAttrWithDelayedArgs(), and ProcessDeclAttribute().
bool ParsedAttr::hasCustomParsing | ( | ) | const |
Definition at line 156 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::HasCustomParsing.
Referenced by checkCommonAttributeFeatures().
|
inline |
Returns true if this attribute was declared in a macro.
Definition at line 500 of file ParsedAttr.h.
|
inline |
Definition at line 352 of file ParsedAttr.h.
Referenced by getNumAttributeArgs(), handleAlignedAttr(), clang::SemaObjC::handleIBOutletCollection(), handleLifetimeCategoryAttr(), handlePreferredTypeAttr(), clang::SemaHLSL::handleResourceTypeAttr(), and handleVecTypeHint().
|
inline |
Definition at line 362 of file ParsedAttr.h.
Referenced by clang::Sema::CheckCallingConvAttr().
bool ParsedAttr::hasVariadicArg | ( | ) | const |
Definition at line 264 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::OptArgs.
Referenced by checkCommonAttributeFeatures(), and MustDelayAttributeArguments().
Definition at line 394 of file ParsedAttr.h.
Referenced by handleCallbackAttr(), handleDeprecatedAttr(), handleDiagnoseAsBuiltinAttr(), clang::SemaM68k::handleInterruptAttr(), clang::SemaMSP430::handleInterruptAttr(), handleVTablePointerAuthentication(), and clang::Sema::ParseLifetimeCaptureByAttr().
Definition at line 400 of file ParsedAttr.h.
Referenced by clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::CreateAnnotationAttr(), HandleAnnotateTypeAttr(), handleArgumentWithTypeTagAttr(), clang::SemaSwift::handleAsyncAttr(), clang::SemaObjC::handleBlocksAttr(), clang::SemaObjC::handleBridgeAttr(), clang::SemaObjC::handleBridgeMutableAttr(), clang::SemaObjC::handleBridgeRelatedAttr(), clang::SemaARM::handleBuiltinAliasAttr(), handleBuiltinAliasAttr(), handleCallableWhenAttr(), handleCallbackAttr(), handleCFGuardAttr(), handleConsumableAttr(), handleCPUSpecificAttr(), handleEnumExtensibilityAttr(), handleFormatAttr(), clang::SemaObjC::handleMethodFamilyAttr(), handleModeAttr(), clang::SemaSwift::handleNewType(), handleOwnershipAttr(), handleParamTypestateAttr(), clang::SemaHLSL::handleResourceBindingAttr(), clang::SemaHLSL::handleResourceTypeAttr(), handleReturnTypestateAttr(), handleSetTypestateAttr(), handleTestTypestateAttr(), handleTypeTagForDatatypeAttr(), handleVTablePointerAuthentication(), and clang::Sema::ParseLifetimeCaptureByAttr().
|
inline |
Is this the Microsoft __declspec(property) attribute?
Definition at line 355 of file ParsedAttr.h.
Referenced by clang::ParsedAttributesView::getMSPropertyAttr().
|
inline |
Definition at line 359 of file ParsedAttr.h.
Referenced by clang::Sema::CheckCallingConvAttr(), clang::checkNewAttrMutualExclusion(), clang::Sema::CheckRegparmAttr(), clang::SemaSwift::handleAttrAttr(), ProcessDeclAttribute(), and ProcessStmtAttribute().
bool ParsedAttr::isKnownToGCC | ( | ) | const |
Definition at line 214 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::IsKnownToGCC.
|
inline |
Definition at line 382 of file ParsedAttr.h.
References clang::SourceLocation::isValid().
Referenced by handleAlignedAttr().
Definition at line 272 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::isParamExpr().
Referenced by MustDelayAttributeArguments().
|
inline |
True if the attribute is specified using '#pragma clang attribute'.
Definition at line 378 of file ParsedAttr.h.
Referenced by clang::Sema::AddPragmaAttributes(), and handleAvailabilityAttr().
bool ParsedAttr::isStmtAttr | ( | ) | const |
Definition at line 197 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::IsStmt.
Referenced by ProcessDeclAttribute().
bool ParsedAttr::isSupportedByPragmaAttribute | ( | ) | const |
Definition at line 216 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::IsSupportedByPragmaAttribute.
bool ParsedAttr::isTargetSpecificAttr | ( | ) | const |
Definition at line 191 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::IsTargetSpecific.
bool ParsedAttr::isTypeAttr | ( | ) | const |
Definition at line 195 of file ParsedAttr.cpp.
References getInfo(), and clang::ParsedAttrInfo::IsType.
Referenced by ProcessDeclAttribute().
|
inline |
Definition at line 374 of file ParsedAttr.h.
Referenced by handleAcquireHandleAttr(), clang::SemaSwift::handleAttrAttr(), handleNullableTypeAttr(), clang::SemaObjC::handleXReturnsXRetainedAttr(), and ProcessDeclAttribute().
|
delete |
|
delete |
|
delete |
Definition at line 360 of file ParsedAttr.h.
References b.
Referenced by clang::Sema::CheckAttrNoArgs(), clang::Sema::CheckAttrTarget(), clang::Sema::CheckCallingConvAttr(), clang::checkNewAttrMutualExclusion(), clang::Sema::CheckRegparmAttr(), clang::SemaSwift::handleAttrAttr(), handleInitPriorityAttr(), handleMinVectorWidthAttr(), clang::SemaARM::handleNewAttr(), handleNonBlockingNonAllocatingTypeAttr(), HandleSwiftAttr(), and handleVTablePointerAuthentication().
|
inline |
Definition at line 380 of file ParsedAttr.h.
Referenced by clang::Sema::ActOnPragmaAttributeAttribute().
|
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 494 of file ParsedAttr.h.
References Loc.
|
inline |
Definition at line 369 of file ParsedAttr.h.
Referenced by clang::Sema::CheckCallingConvAttr().
Definition at line 375 of file ParsedAttr.h.
References Used.
Referenced by createSimpleAttr(), and HandleSwiftAttr().
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 220 of file ParsedAttr.cpp.
References clang::AttributeCommonInfo::getParsedKind(), clang::AttributeCommonInfo::isAlignas(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::AttributeCommonInfo::isStandardAttributeSyntax().
Referenced by ProcessDeclAttribute().
|
friend |
Definition at line 215 of file ParsedAttr.h.
|
friend |
Definition at line 216 of file ParsedAttr.h.