clang 19.0.0git
|
#include "clang/Basic/AttributeCommonInfo.h"
Classes | |
class | Form |
Combines information about the source-code form of an attribute, including its syntax and spelling. More... | |
Public Types | |
enum | Syntax { AS_GNU = 1 , AS_CXX11 , AS_C23 , AS_Declspec , AS_Microsoft , AS_Keyword , AS_Pragma , AS_ContextSensitiveKeyword , AS_HLSLSemantic , AS_Implicit } |
The style used to specify an attribute. More... | |
enum | Kind { NoSemaHandlerAttribute , IgnoredAttribute , UnknownAttribute } |
Static Public Member Functions | |
static Kind | getParsedKind (const IdentifierInfo *Name, const IdentifierInfo *Scope, Syntax SyntaxUsed) |
Protected Member Functions | |
bool | isAttributeSpellingListCalculated () const |
Static Protected Attributes | |
static constexpr unsigned | SpellingNotCalculated = 0xf |
Friends | |
class | clang::ASTRecordWriter |
Definition at line 25 of file AttributeCommonInfo.h.
Enumerator | |
---|---|
NoSemaHandlerAttribute | |
IgnoredAttribute | |
UnknownAttribute |
Definition at line 62 of file AttributeCommonInfo.h.
The style used to specify an attribute.
Definition at line 28 of file AttributeCommonInfo.h.
|
inline |
Definition at line 140 of file AttributeCommonInfo.h.
References AS_GNU, and AS_Implicit.
|
inline |
Definition at line 153 of file AttributeCommonInfo.h.
|
inline |
Definition at line 161 of file AttributeCommonInfo.h.
|
inline |
Definition at line 166 of file AttributeCommonInfo.h.
|
default |
|
default |
|
inline |
Definition at line 231 of file AttributeCommonInfo.h.
References isAttributeSpellingListCalculated().
Referenced by clang::ParsedAttr::existsInTarget(), clang::Attr::getSpellingListIndex(), handleSuppressAttr(), and clang::Sema::mergeSectionAttr().
|
inline |
Definition at line 179 of file AttributeCommonInfo.h.
Referenced by clang::Sema::ActOnCXXAssumeAttr(), clang::ASTRecordWriter::AddAttr(), getNormalizedFullName(), handleAlwaysInlineAttr(), handleArgumentWithTypeTagAttr(), handleEnforceTCBAttr(), handleNoSanitizeSpecificAttr(), HandleOpenCLAccessAttr(), handleOpenCLAccessAttr(), and clang::operator<<().
|
inline |
Definition at line 175 of file AttributeCommonInfo.h.
References getSyntax().
|
inline |
Definition at line 181 of file AttributeCommonInfo.h.
References clang::SourceRange::getBegin().
Referenced by clang::Sema::ActOnCXXAssumeAttr(), clang::Sema::AddAlignedAttr(), clang::Sema::AddAlignValueAttr(), clang::Sema::AddAllocAlignAttr(), clang::Sema::AddAssumeAlignedAttr(), clang::Sema::AddModeAttr(), clang::Sema::AddParameterABIAttr(), attrNonNullArgCheck(), clang::Sema::BuildCodeAlignAttr(), checkAcquireOrderAttrCommon(), checkAMDGPUMaxNumWorkGroupsArguments(), checkArmNewAttrMutualExclusion(), checkAttrArgsAreCapabilityObjs(), checkAttributeNumArgsImpl(), checkAttrMutualExclusion(), clang::Sema::CheckAttrTarget(), clang::Sema::CheckCallingConvAttr(), checkForConsumableClass(), checkFunctionConditionAttr(), checkIBOutletCommon(), checkMutualExclusion(), CheckNullabilityTypeSpecifier(), clang::Sema::CheckRegparmAttr(), checkTryLockFunAttrCommon(), clang::Sema::DiagnoseHLSLAttrStageMismatch(), clang::ParsedAttr::diagnoseLangOpts(), getAttrLoc(), handleAbiTagAttr(), handleAcquireHandleAttr(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAllocSizeAttr(), handleAnalyzerNoReturnAttr(), HandleAnnotateTypeAttr(), handleAnyX86InterruptAttr(), handleArgumentWithTypeTagAttr(), handleArmBuiltinAliasAttr(), handleARMInterruptAttr(), HandleArmMveStrictPolymorphismAttr(), handleArmNewAttr(), handleArmStateAttribute(), HandleArmSveVectorBitsTypeAttr(), handleAvailabilityAttr(), handleBlocksAttr(), HandleBTFTypeTagAttribute(), handleBuiltinAliasAttr(), handleCallbackAttr(), handleCallConvAttr(), handleCalledOnceAttr(), handleCFGuardAttr(), handleCmseNSEntryAttr(), handleCodeSegAttr(), handleCommonAttr(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), handleCountedByAttr(), handleCPUSpecificAttr(), handleDeclspecThreadAttr(), handleDependencyAttr(), handleDeprecatedAttr(), handleDeviceAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), handleEnableIfAttr(), handleEnforceTCBAttr(), handleEnumExtensibilityAttr(), HandleExtVectorTypeAttr(), handleFallThroughAttr(), handleFormatArgAttr(), handleFormatAttr(), handleGNUInlineAttr(), handleHLSLNumThreadsAttr(), handleHLSLResourceBindingAttr(), handleHLSLShaderAttr(), handleHLSLSV_DispatchThreadIDAttr(), handleIBOutletCollection(), handleIFuncAttr(), handleInitPriorityAttr(), handleLayoutVersion(), handleLifetimeCategoryAttr(), handleLikely(), handleM68kInterruptAttr(), handleManagedAttr(), HandleMatrixTypeAttr(), handleMinVectorWidthAttr(), handleMipsInterruptAttr(), handleModeAttr(), handleMSAllocatorAttr(), handleMSConstexprAttr(), handleMSInheritanceAttr(), handleMSP430InterruptAttr(), handleMSPointerTypeQualifierAttr(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handleNoCfCheckAttr(), handleNoEscapeAttr(), handleNoMergeAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoReturnAttr(), handleNSErrorDomain(), handleObjCBridgeAttr(), handleObjCDirectAttr(), handleObjCDirectMembersAttr(), handleObjCMethodFamilyAttr(), handleObjCPreciseLifetimeAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCSuppresProtocolAttr(), HandleOpenCLAccessAttr(), handleOpenCLAccessAttr(), handleOpenCLNoSVMAttr(), handleOpenCLUnrollHint(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), handlePreferredName(), handlePreferredTypeAttr(), handleRestrictAttr(), handleReturnTypestateAttr(), handleRISCVInterruptAttr(), HandleRISCVRVVVectorBitsTypeAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedAttr(), handleStandardNoReturnAttr(), handleSubGroupSize(), handleSuppressAttr(), handleSwiftAsyncAttr(), handleSwiftAsyncError(), handleSwiftBridge(), handleSwiftError(), handleSwiftNewType(), handleTargetClonesAttr(), handleTestTypestateAttr(), handleTransparentUnionAttr(), handleTypeTagForDatatypeAttr(), handleUnlikely(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), HandleVectorSizeAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), HandleWebAssemblyFuncrefAttr(), handleWebAssemblyImportModuleAttr(), handleWebAssemblyImportNameAttr(), handleWorkGroupSize(), handleX86ForceAlignArgPointerAttr(), instantiateDependentAnnotationAttr(), clang::Sema::mergeAlwaysInlineAttr(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeCodeSegAttr(), clang::Sema::mergeDLLImportAttr(), clang::Sema::mergeErrorAttr(), clang::Sema::mergeHLSLNumThreadsAttr(), clang::Sema::mergeHLSLParamModifierAttr(), clang::Sema::mergeHLSLShaderAttr(), clang::Sema::mergeInternalLinkageAttr(), clang::Sema::mergeMinSizeAttr(), clang::Sema::mergeMSInheritanceAttr(), clang::Sema::mergeOptimizeNoneAttr(), clang::Sema::mergeSectionAttr(), clang::Sema::mergeUuidAttr(), mergeVisibilityAttr(), ProcessDeclAttribute(), ProcessStmtAttribute(), threadSafetyCheckIsPointer(), and verifyValidIntegerConstantExpr().
std::string AttributeCommonInfo::getNormalizedFullName | ( | ) | const |
Gets the normalized full name, which consists of both scope and name and with surrounding underscores removed as appropriate (e.g.
gnu::attr will be normalized to gnu::attr).
Definition at line 151 of file Attributes.cpp.
References getAttrName(), getScopeName(), getSyntax(), and normalizeName().
Referenced by clang::ParsedAttrInfo::get(), and clang::Sema::mergeErrorAttr().
|
inline |
Definition at line 173 of file AttributeCommonInfo.h.
Referenced by clang::ASTRecordWriter::AddAttr(), clang::ParsedAttr::existsInTarget(), clang::ParsedAttrInfo::get(), handleCPUSpecificAttr(), clang::ParsedAttributesView::hasAttribute(), isAlignas(), IsBuiltInOrStandardCXX11Attribute(), and clang::ParsedAttr::slidesFromDeclToDeclSpecLegacyBehavior().
|
static |
Definition at line 145 of file Attributes.cpp.
References normalizeName().
|
inline |
Definition at line 182 of file AttributeCommonInfo.h.
Referenced by clang::Sema::ActOnIfStmt(), clang::Sema::AddAllocAlignAttr(), clang::Sema::AddAssumeAlignedAttr(), clang::ASTRecordWriter::AddAttr(), clang::Sema::AddModeAttr(), clang::Sema::AddXConsumedAttr(), clang::Sema::CheckAttrTarget(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::DiagnoseSentinelCalls(), clang::AttributedTypeLoc::getLocalSourceRange(), clang::Attr::getLocation(), handleAcquireHandleAttr(), handleAvailabilityAttr(), handleCallbackAttr(), handleDeprecatedAttr(), handleDLLAttr(), handleFallThroughAttr(), handleMSAllocatorAttr(), handleMSConstexprAttr(), handleNoEscapeAttr(), handleObjCOwnershipAttr(), handleObjCSuppresProtocolAttr(), HandleOpenCLAccessAttr(), handleOpenCLAccessAttr(), handleOpenCLUnrollHint(), handleRISCVInterruptAttr(), handleStandardNoReturnAttr(), handleVisibilityAttr(), handleXReturnsXRetainedAttr(), instantiateOMPDeclareSimdDeclAttr(), instantiateOMPDeclareVariantAttr(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeFormatAttr(), clang::Sema::mergeHLSLParamModifierAttr(), clang::Sema::mergeMSInheritanceAttr(), ProcessDeclAttribute(), ProcessStmtAttribute(), clang::JSONNodeDumper::Visit(), and clang::TextNodeDumper::Visit().
|
inline |
Definition at line 187 of file AttributeCommonInfo.h.
Referenced by clang::ASTRecordWriter::AddAttr().
|
inline |
Definition at line 186 of file AttributeCommonInfo.h.
Referenced by clang::ASTRecordWriter::AddAttr(), getNormalizedFullName(), handleFallThroughAttr(), handleLikely(), handleUnlikely(), handleUnusedAttr(), and handleWarnUnusedResult().
|
inline |
Definition at line 174 of file AttributeCommonInfo.h.
Referenced by clang::ASTRecordWriter::AddAttr(), clang::ParsedAttrInfo::get(), getForm(), and getNormalizedFullName().
|
inline |
Definition at line 185 of file AttributeCommonInfo.h.
|
inline |
Definition at line 204 of file AttributeCommonInfo.h.
References getParsedKind(), and isKeywordAttribute().
|
inlineprotected |
Definition at line 254 of file AttributeCommonInfo.h.
References SpellingNotCalculated.
Referenced by getAttributeSpellingListIndex().
|
inline |
Definition at line 202 of file AttributeCommonInfo.h.
References AS_C23.
Referenced by isStandardAttributeSyntax().
bool AttributeCommonInfo::isClangScope | ( | ) | const |
Definition at line 121 of file Attributes.cpp.
References clang::IdentifierInfo::isStr().
Referenced by handleWarnUnusedResult(), and ProcessDeclAttribute().
|
inline |
Definition at line 227 of file AttributeCommonInfo.h.
References AS_ContextSensitiveKeyword.
Referenced by CheckNullabilityTypeSpecifier().
|
inline |
Definition at line 200 of file AttributeCommonInfo.h.
References AS_CXX11.
Referenced by handleDeprecatedAttr(), handleFallThroughAttr(), handleLikely(), handleUnlikely(), handleUnusedAttr(), isStandardAttributeSyntax(), and ProcessDeclAttribute().
|
inline |
Definition at line 194 of file AttributeCommonInfo.h.
References AS_Declspec.
Referenced by handleDeprecatedAttr(), handleNakedAttr(), mustPrintOnLeftSide(), ProcessDeclAttribute(), and ProcessStmtAttribute().
|
inline |
Definition at line 219 of file AttributeCommonInfo.h.
References AS_GNU.
Referenced by handleWarnUnusedResult().
bool AttributeCommonInfo::isGNUScope | ( | ) | const |
Definition at line 117 of file Attributes.cpp.
References clang::IdentifierInfo::isStr().
Referenced by handleDeprecatedAttr(), and handleWarnUnusedResult().
|
inline |
Definition at line 221 of file AttributeCommonInfo.h.
References AS_ContextSensitiveKeyword, and AS_Keyword.
Referenced by isAlignas().
|
inline |
Definition at line 195 of file AttributeCommonInfo.h.
References AS_Microsoft.
Referenced by handleUuidAttr().
|
inline |
Definition at line 225 of file AttributeCommonInfo.h.
Referenced by clang::ASTRecordWriter::AddAttr(), clang::Sema::AddParameterABIAttr(), checkAttrMutualExclusion(), clang::Sema::CheckAttrTarget(), checkMutualExclusion(), clang::Declarator::Declarator(), clang::Sema::DiagnoseSwiftName(), handleAnalyzerNoReturnAttr(), handleAnyX86InterruptAttr(), handleAVRInterruptAttr(), handleAVRSignalAttr(), handleCallConvAttr(), handleLifetimeCategoryAttr(), handleMipsInterruptAttr(), handleMSP430InterruptAttr(), handleNakedAttr(), handleNoReturnAttr(), handleNoSanitizeSpecificAttr(), handleObjCOwnershipAttr(), handleOwnershipAttr(), handleRISCVInterruptAttr(), handleSentinelAttr(), handleSwiftNewType(), handleTransparentUnionAttr(), handleTypeTagForDatatypeAttr(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWebAssemblyExportNameAttr(), handleX86ForceAlignArgPointerAttr(), handleXReturnsXRetainedAttr(), clang::Sema::mergeErrorAttr(), clang::Sema::mergeInternalLinkageAttr(), ProcessDeclAttribute(), ProcessStmtAttribute(), clang::ParsedAttr::slidesFromDeclToDeclSpecLegacyBehavior(), and validateAlignasAppliedType().
|
inline |
The attribute is spelled [[]] in either C or C++ mode, including standard attributes spelled with a keyword, like alignas.
Definition at line 215 of file AttributeCommonInfo.h.
References isC23Attribute(), and isCXX11Attribute().
Referenced by canPrintOnLeftSide(), clang::Declarator::Declarator(), handleAnalyzerNoReturnAttr(), handleDeprecatedAttr(), handleNoSanitizeSpecificAttr(), handleWarnUnusedResult(), ProcessDeclAttribute(), and clang::ParsedAttr::slidesFromDeclToDeclSpecLegacyBehavior().
|
inline |
Definition at line 238 of file AttributeCommonInfo.h.
References V.
Referenced by handleNoSanitizeSpecificAttr().
|
inline |
Definition at line 180 of file AttributeCommonInfo.h.
|
inline |
Definition at line 183 of file AttributeCommonInfo.h.
|
friend |
Definition at line 249 of file AttributeCommonInfo.h.
|
staticconstexprprotected |
Definition at line 90 of file AttributeCommonInfo.h.
Referenced by isAttributeSpellingListCalculated(), and clang::AttributeCommonInfo::Form::Keyword().