clang 20.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_HLSLAnnotation , 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(), clang::SemaOpenCL::handleAccessAttr(), handleAlwaysInlineAttr(), handleArgumentWithTypeTagAttr(), handleEnforceTCBAttr(), handleNonBlockingNonAllocatingTypeAttr(), handleNoSanitizeSpecificAttr(), 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::SemaSwift::AddParameterABIAttr(), attrNonNullArgCheck(), clang::Sema::BuildCodeAlignAttr(), checkAcquireOrderAttrCommon(), clang::checkAMDGPUMaxNumWorkGroupsArguments(), checkAttrArgsAreCapabilityObjs(), checkAttributeNumArgsImpl(), clang::checkAttrMutualExclusion(), clang::Sema::CheckAttrTarget(), clang::Sema::CheckCallingConvAttr(), checkForConsumableClass(), checkFunctionConditionAttr(), clang::checkIBOutletCommon(), checkMutualExclusion(), clang::checkNewAttrMutualExclusion(), CheckNullabilityTypeSpecifier(), clang::Sema::CheckRegparmAttr(), checkTryLockFunAttrCommon(), clang::SemaHLSL::DiagnoseAttrStageMismatch(), clang::ParsedAttr::diagnoseLangOpts(), clang::Sema::getAttrLoc(), getPosAsWritten(), handleAbiTagAttr(), clang::SemaOpenCL::handleAccessAttr(), handleAcquireHandleAttr(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAllocSizeAttr(), handleAnalyzerNoReturnAttr(), HandleAnnotateTypeAttr(), clang::SemaX86::handleAnyInterruptAttr(), handleArgumentWithTypeTagAttr(), HandleArmMveStrictPolymorphismAttr(), handleArmStateAttribute(), HandleArmSveVectorBitsTypeAttr(), clang::SemaSwift::handleAsyncAttr(), clang::SemaSwift::handleAsyncError(), handleAvailabilityAttr(), clang::SemaObjC::handleBlocksAttr(), clang::SemaSwift::handleBridge(), clang::SemaObjC::handleBridgeAttr(), HandleBTFTypeTagAttribute(), clang::SemaARM::handleBuiltinAliasAttr(), handleBuiltinAliasAttr(), handleCallbackAttr(), handleCallConvAttr(), handleCalledOnceAttr(), handleCFGuardAttr(), clang::SemaARM::handleCmseNSEntryAttr(), handleCodeSegAttr(), handleCommonAttr(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), handleCPUSpecificAttr(), handleDeclspecThreadAttr(), handleDependencyAttr(), handleDeprecatedAttr(), handleDeviceAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), clang::SemaObjC::handleDirectAttr(), clang::SemaObjC::handleDirectMembersAttr(), handleEnableIfAttr(), handleEnforceTCBAttr(), handleEnumExtensibilityAttr(), clang::SemaSwift::handleError(), handleExcludeFromExplicitInstantiationAttr(), HandleExtVectorTypeAttr(), handleFallThroughAttr(), clang::SemaX86::handleForceAlignArgPointerAttr(), handleFormatArgAttr(), handleFormatAttr(), handleGNUInlineAttr(), clang::SemaObjC::handleIBOutletCollection(), handleIFuncAttr(), handleInitPriorityAttr(), clang::SemaARM::handleInterruptAttr(), clang::SemaM68k::handleInterruptAttr(), clang::SemaMIPS::handleInterruptAttr(), clang::SemaMSP430::handleInterruptAttr(), clang::SemaRISCV::handleInterruptAttr(), handleLayoutVersion(), handleLifetimeCategoryAttr(), handleLikely(), handleManagedAttr(), HandleMatrixTypeAttr(), clang::SemaObjC::handleMethodFamilyAttr(), handleMinVectorWidthAttr(), handleModeAttr(), handleMSAllocatorAttr(), handleMSConstexprAttr(), handleMSInheritanceAttr(), handleMSPointerTypeQualifierAttr(), handleNakedAttr(), HandleNeonVectorTypeAttr(), clang::SemaARM::handleNewAttr(), clang::SemaSwift::handleNewType(), handleNoCfCheckAttr(), handleNoEscapeAttr(), handleNoMergeAttr(), handleNonBlockingNonAllocatingTypeAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoReturnAttr(), clang::SemaOpenCL::handleNoSVMAttr(), clang::SemaObjC::handleNSErrorDomain(), clang::SemaHLSL::handleNumThreadsAttr(), HandleOpenCLAccessAttr(), handleOpenCLUnrollHint(), handleOwnershipAttr(), handlePackedAttr(), clang::SemaHLSL::handlePackOffsetAttr(), handleParamTypestateAttr(), handlePatchableFunctionEntryAttr(), clang::SemaObjC::handlePreciseLifetimeAttr(), handlePreferredName(), handlePreferredTypeAttr(), clang::SemaHLSL::handleResourceBindingAttr(), clang::SemaHLSL::handleResourceClassAttr(), handleRestrictAttr(), clang::SemaObjC::handleReturnsInnerPointerAttr(), handleReturnTypestateAttr(), HandleRISCVRVVVectorBitsTypeAttr(), handleSentinelAttr(), handleSetTypestateAttr(), clang::SemaHLSL::handleShaderAttr(), handleSharedAttr(), handleStandardNoReturnAttr(), clang::SemaOpenCL::handleSubGroupSize(), clang::SemaObjC::handleSuppresProtocolAttr(), handleSuppressAttr(), clang::SemaHLSL::handleSV_DispatchThreadIDAttr(), handleTargetClonesAttr(), handleTestTypestateAttr(), handleTransparentUnionAttr(), handleTypeTagForDatatypeAttr(), handleUnlikely(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), HandleVectorSizeAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleVTablePointerAuthentication(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), HandleWebAssemblyFuncrefAttr(), clang::SemaWasm::handleWebAssemblyImportModuleAttr(), clang::SemaWasm::handleWebAssemblyImportNameAttr(), handleWorkGroupSize(), instantiateDependentAnnotationAttr(), markUsedForAliasOrIfunc(), clang::Sema::mergeAlwaysInlineAttr(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeCodeSegAttr(), clang::Sema::mergeDLLImportAttr(), clang::Sema::mergeErrorAttr(), clang::Sema::mergeInternalLinkageAttr(), clang::Sema::mergeMinSizeAttr(), clang::Sema::mergeMSInheritanceAttr(), clang::SemaHLSL::mergeNumThreadsAttr(), clang::Sema::mergeOptimizeNoneAttr(), clang::SemaHLSL::mergeParamModifierAttr(), clang::Sema::mergeSectionAttr(), clang::SemaHLSL::mergeShaderAttr(), 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::SemaObjC::AddXConsumedAttr(), clang::Sema::CheckAttrTarget(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::DiagnoseSentinelCalls(), clang::AttributedTypeLoc::getLocalSourceRange(), clang::Attr::getLocation(), clang::SemaOpenCL::handleAccessAttr(), handleAcquireHandleAttr(), handleAvailabilityAttr(), handleCallbackAttr(), handleDeprecatedAttr(), handleDLLAttr(), handleFallThroughAttr(), clang::SemaRISCV::handleInterruptAttr(), handleMSAllocatorAttr(), handleMSConstexprAttr(), handleNoEscapeAttr(), handleNullableTypeAttr(), HandleOpenCLAccessAttr(), handleOpenCLUnrollHint(), clang::SemaObjC::handleOwnershipAttr(), handleStandardNoReturnAttr(), clang::SemaObjC::handleSuppresProtocolAttr(), handleVisibilityAttr(), clang::SemaObjC::handleXReturnsXRetainedAttr(), instantiateOMPDeclareSimdDeclAttr(), instantiateOMPDeclareVariantAttr(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeFormatAttr(), clang::Sema::mergeMSInheritanceAttr(), clang::SemaHLSL::mergeParamModifierAttr(), 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::Sema::ActOnCXXAssumeAttr(), 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().
Referenced by clang::ParsedAttr::slidesFromDeclToDeclSpecLegacyBehavior().
|
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(), and ProcessDeclAttribute().
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(), 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::SemaSwift::AddParameterABIAttr(), clang::checkAttrMutualExclusion(), clang::Sema::CheckAttrTarget(), checkMutualExclusion(), clang::Declarator::Declarator(), clang::SemaSwift::DiagnoseName(), handleAnalyzerNoReturnAttr(), clang::SemaX86::handleAnyInterruptAttr(), handleCallConvAttr(), clang::SemaX86::handleForceAlignArgPointerAttr(), clang::SemaAVR::handleInterruptAttr(), clang::SemaMIPS::handleInterruptAttr(), clang::SemaMSP430::handleInterruptAttr(), clang::SemaRISCV::handleInterruptAttr(), handleLifetimeCategoryAttr(), handleNakedAttr(), clang::SemaSwift::handleNewType(), handleNoReturnAttr(), handleNoSanitizeSpecificAttr(), handleNullableTypeAttr(), clang::SemaObjC::handleOwnershipAttr(), handleOwnershipAttr(), handleSentinelAttr(), clang::SemaAVR::handleSignalAttr(), handleTransparentUnionAttr(), handleTypeTagForDatatypeAttr(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), clang::SemaWasm::handleWebAssemblyExportNameAttr(), clang::SemaObjC::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 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().