clang 18.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 132 of file AttributeCommonInfo.h.
References AS_GNU, and AS_Implicit.
|
inline |
Definition at line 145 of file AttributeCommonInfo.h.
|
inline |
Definition at line 153 of file AttributeCommonInfo.h.
|
inline |
Definition at line 158 of file AttributeCommonInfo.h.
|
default |
|
default |
|
inline |
Definition at line 213 of file AttributeCommonInfo.h.
References isAttributeSpellingListCalculated().
Referenced by clang::ParsedAttr::existsInTarget(), clang::Attr::getSpellingListIndex(), and clang::Sema::mergeSectionAttr().
|
inline |
Definition at line 171 of file AttributeCommonInfo.h.
Referenced by clang::ASTRecordWriter::AddAttr(), getNormalizedFullName(), handleAlwaysInlineAttr(), handleArgumentWithTypeTagAttr(), handleEnforceTCBAttr(), handleNoSanitizeSpecificAttr(), HandleOpenCLAccessAttr(), handleOpenCLAccessAttr(), and clang::operator<<().
|
inline |
Definition at line 167 of file AttributeCommonInfo.h.
References getSyntax().
|
inline |
Definition at line 172 of file AttributeCommonInfo.h.
References clang::SourceRange::getBegin().
Referenced by clang::Sema::AddAlignedAttr(), clang::Sema::AddAlignValueAttr(), clang::Sema::AddAllocAlignAttr(), clang::Sema::AddAssumeAlignedAttr(), clang::Sema::AddModeAttr(), clang::Sema::AddParameterABIAttr(), attrNonNullArgCheck(), checkAcquireOrderAttrCommon(), checkAttrArgsAreCapabilityObjs(), checkAttributeNumArgsImpl(), checkAttrMutualExclusion(), clang::Sema::CheckAttrTarget(), clang::Sema::CheckCallingConvAttr(), checkForConsumableClass(), checkFunctionConditionAttr(), checkIBOutletCommon(), checkMutualExclusion(), clang::Sema::CheckRegparmAttr(), checkTryLockFunAttrCommon(), clang::Sema::DiagnoseHLSLAttrStageMismatch(), clang::ParsedAttr::diagnoseLangOpts(), getAttrLoc(), handleAbiTagAttr(), handleAcquireHandleAttr(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAllocSizeAttr(), handleAnalyzerNoReturnAttr(), HandleAnnotateTypeAttr(), handleAnyX86InterruptAttr(), handleArgumentWithTypeTagAttr(), handleArmBuiltinAliasAttr(), handleARMInterruptAttr(), HandleArmMveStrictPolymorphismAttr(), handleArmNewZaAttr(), HandleArmSveVectorBitsTypeAttr(), handleAvailabilityAttr(), handleBlocksAttr(), HandleBTFTypeTagAttribute(), handleBuiltinAliasAttr(), handleCallbackAttr(), handleCallConvAttr(), handleCalledOnceAttr(), handleCFGuardAttr(), handleCmseNSEntryAttr(), handleCodeSegAttr(), handleCommonAttr(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), 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(), 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(), handleRestrictAttr(), handleReturnTypestateAttr(), handleRISCVInterruptAttr(), HandleRISCVRVVVectorBitsTypeAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedAttr(), handleStandardNoReturnAttr(), handleSubGroupSize(), 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::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 147 of file Attributes.cpp.
References getAttrName(), getScopeName(), getSyntax(), and normalizeName().
Referenced by clang::ParsedAttrInfo::get(), and clang::Sema::mergeErrorAttr().
|
inline |
Definition at line 165 of file AttributeCommonInfo.h.
Referenced by clang::ASTRecordWriter::AddAttr(), clang::ParsedAttr::asHLSLLangAS(), clang::ParsedAttr::asOpenCLLangAS(), clang::ParsedAttrInfo::get(), clang::ParsedAttr::getAvailabilityDeprecated(), clang::ParsedAttr::getAvailabilityIntroduced(), clang::ParsedAttr::getAvailabilityObsoleted(), clang::ParsedAttr::getLayoutCompatible(), clang::ParsedAttr::getMatchingCType(), clang::ParsedAttr::getMessageExpr(), clang::ParsedAttr::getMustBeNull(), clang::ParsedAttr::getReplacementExpr(), clang::ParsedAttr::getStrictLoc(), clang::ParsedAttr::getUnavailableLoc(), handleCPUSpecificAttr(), clang::ParsedAttributesView::hasAttribute(), IsBuiltInOrStandardCXX11Attribute(), and clang::ParsedAttr::slidesFromDeclToDeclSpecLegacyBehavior().
|
static |
Definition at line 141 of file Attributes.cpp.
References normalizeName().
|
inline |
Definition at line 173 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::AttributedTypeLoc::getLocalSourceRange(), clang::Attr::getLocation(), handleAcquireHandleAttr(), handleAvailabilityAttr(), handleCallbackAttr(), handleDeprecatedAttr(), handleDLLAttr(), handleFallThroughAttr(), handleMSAllocatorAttr(), handleNoEscapeAttr(), handleObjCOwnershipAttr(), handleObjCSuppresProtocolAttr(), HandleOpenCLAccessAttr(), handleOpenCLAccessAttr(), handleOpenCLUnrollHint(), handleRISCVInterruptAttr(), handleStandardNoReturnAttr(), handleVisibilityAttr(), handleXReturnsXRetainedAttr(), instantiateOMPDeclareSimdDeclAttr(), instantiateOMPDeclareVariantAttr(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeFormatAttr(), clang::Sema::mergeMSInheritanceAttr(), ProcessDeclAttribute(), ProcessStmtAttribute(), clang::JSONNodeDumper::Visit(), and clang::TextNodeDumper::Visit().
|
inline |
Definition at line 178 of file AttributeCommonInfo.h.
Referenced by clang::ASTRecordWriter::AddAttr().
|
inline |
Definition at line 177 of file AttributeCommonInfo.h.
Referenced by clang::ASTRecordWriter::AddAttr(), getNormalizedFullName(), handleFallThroughAttr(), handleLikely(), handleUnlikely(), handleUnusedAttr(), and handleWarnUnusedResult().
|
inline |
Definition at line 166 of file AttributeCommonInfo.h.
Referenced by clang::ASTRecordWriter::AddAttr(), clang::ParsedAttrInfo::get(), getForm(), and getNormalizedFullName().
|
inline |
Definition at line 176 of file AttributeCommonInfo.h.
|
inlineprotected |
Definition at line 236 of file AttributeCommonInfo.h.
References SpellingNotCalculated.
Referenced by getAttributeSpellingListIndex().
|
inline |
Definition at line 193 of file AttributeCommonInfo.h.
References AS_C23.
Referenced by isStandardAttributeSyntax().
bool AttributeCommonInfo::isClangScope | ( | ) | const |
Definition at line 117 of file Attributes.cpp.
References clang::IdentifierInfo::isStr().
Referenced by handleWarnUnusedResult(), and ProcessDeclAttribute().
|
inline |
Definition at line 209 of file AttributeCommonInfo.h.
References AS_ContextSensitiveKeyword.
|
inline |
Definition at line 191 of file AttributeCommonInfo.h.
References AS_CXX11.
Referenced by handleDeprecatedAttr(), handleFallThroughAttr(), handleLikely(), handleUnlikely(), handleUnusedAttr(), isStandardAttributeSyntax(), and ProcessDeclAttribute().
|
inline |
Definition at line 185 of file AttributeCommonInfo.h.
References AS_Declspec.
Referenced by handleDeprecatedAttr(), handleNakedAttr(), mustPrintOnLeftSide(), ProcessDeclAttribute(), and ProcessStmtAttribute().
|
inline |
Definition at line 201 of file AttributeCommonInfo.h.
References AS_GNU.
Referenced by handleWarnUnusedResult().
bool AttributeCommonInfo::isGNUScope | ( | ) | const |
Definition at line 113 of file Attributes.cpp.
References clang::IdentifierInfo::isStr().
Referenced by handleDeprecatedAttr(), and handleWarnUnusedResult().
|
inline |
Definition at line 203 of file AttributeCommonInfo.h.
References AS_ContextSensitiveKeyword, and AS_Keyword.
|
inline |
Definition at line 186 of file AttributeCommonInfo.h.
References AS_Microsoft.
Referenced by handleUuidAttr().
|
inline |
Definition at line 207 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 197 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 220 of file AttributeCommonInfo.h.
References V.
Referenced by handleNoSanitizeSpecificAttr().
|
inline |
Definition at line 174 of file AttributeCommonInfo.h.
|
friend |
Definition at line 231 of file AttributeCommonInfo.h.
|
staticconstexprprotected |
Definition at line 85 of file AttributeCommonInfo.h.
Referenced by isAttributeSpellingListCalculated(), and clang::AttributeCommonInfo::Form::Keyword().