clang API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends
clang::AttributeList Class Reference

#include <AttributeList.h>

List of all members.

Classes

class  arg_iterator

Public Types

enum  Kind

Public Member Functions

IdentifierInfogetName () const
SourceLocation getLoc () const
SourceRange getRange () const
bool hasScope () const
IdentifierInfogetScopeName () const
SourceLocation getScopeLoc () const
IdentifierInfogetParameterName () const
SourceLocation getParameterLoc () const
bool isDeclspecAttribute () const
bool isCXX0XAttribute () const
bool isInvalid () const
void setInvalid (bool b=true) const
bool isUsedAsTypeAttr () const
void setUsedAsTypeAttr ()
Kind getKind () const
AttributeListgetNext () const
void setNext (AttributeList *N)
unsigned getNumArgs () const
 getNumArgs - Return the number of actual arguments to this attribute.
bool hasParameterOrArguments () const
ExprgetArg (unsigned Arg) const
 getArg - Return the specified argument.
arg_iterator arg_begin () const
arg_iterator arg_end () const
const AvailabilityChangegetAvailabilityIntroduced () const
const AvailabilityChangegetAvailabilityDeprecated () const
const AvailabilityChangegetAvailabilityObsoleted () const
SourceLocation getUnavailableLoc () const
const ExprgetMessageExpr () const

Static Public Member Functions

static Kind getKind (const IdentifierInfo *Name, const IdentifierInfo *Scope)

Friends

class AttributePool
class AttributeFactory

Detailed Description

AttributeList - Represents GCC's __attribute__ declaration. There are 4 forms of this construct...they are:

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 54 of file AttributeList.h.


Member Enumeration Documentation

Definition at line 162 of file AttributeList.h.


Member Function Documentation

arg_iterator clang::AttributeList::arg_begin ( ) const [inline]

Definition at line 239 of file AttributeList.h.

Referenced by handleNonNullAttr(), and handleOwnershipAttr().

arg_iterator clang::AttributeList::arg_end ( ) const [inline]

Definition at line 243 of file AttributeList.h.

Referenced by handleNonNullAttr(), and handleOwnershipAttr().

Expr* clang::AttributeList::getArg ( unsigned  Arg) const [inline]
const AvailabilityChange& clang::AttributeList::getAvailabilityDeprecated ( ) const [inline]

Definition at line 252 of file AttributeList.h.

References getKind().

Referenced by handleAvailabilityAttr().

const AvailabilityChange& clang::AttributeList::getAvailabilityIntroduced ( ) const [inline]

Definition at line 247 of file AttributeList.h.

References getKind().

Referenced by handleAvailabilityAttr().

const AvailabilityChange& clang::AttributeList::getAvailabilityObsoleted ( ) const [inline]

Definition at line 257 of file AttributeList.h.

References getKind().

Referenced by handleAvailabilityAttr().

Kind clang::AttributeList::getKind ( ) const [inline]
AttributeList::Kind AttributeList::getKind ( const IdentifierInfo Name,
const IdentifierInfo Scope 
) [static]

Definition at line 103 of file AttributeList.cpp.

References clang::IdentifierInfo::getName().

SourceLocation clang::AttributeList::getLoc ( ) const [inline]

Definition at line 171 of file AttributeList.h.

References clang::SourceRange::getBegin().

Referenced by checkAttrArgsAreLockableObjs(), checkAttributeAtLeastNumArgs(), checkAttributeNumArgs(), clang::Sema::CheckCallingConvAttr(), checkForLockableRecord(), checkIBOutletCommon(), clang::Sema::CheckNoReturnAttr(), clang::Sema::CheckRegparmAttr(), checkUnusedDeclAttributes(), diagnoseBadTypeAttribute(), fillAttributedTypeLoc(), handleAcquireOrderAttr(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAlwaysInlineAttr(), handleAnalyzerNoReturnAttr(), handleArcWeakrefUnavailableAttr(), handleAttrWithMessage(), handleBlocksAttr(), handleCallConvAttr(), handleCleanupAttr(), handleColdAttr(), handleCommonAttr(), handleConstantAttr(), handleConstAttr(), handleConstructorAttr(), handleDependencyAttr(), handleDestructorAttr(), handleDeviceAttr(), HandleDLLExportAttr(), HandleDLLImportAttr(), handleExtVectorTypeAttr(), HandleExtVectorTypeAttr(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionTypeAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleGuardedVarAttr(), handleHostAttr(), handleHotAttr(), handleIBAction(), handleIBOutletCollection(), handleInitPriorityAttr(), handleLaunchBoundsAttr(), handleLockableAttr(), handleLockFunAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleLocksRequiredAttr(), handleMallocAttr(), HandleMBlazeInterruptHandlerAttr(), HandleMBlazeSaveVolatilesAttr(), handleModeAttr(), HandleMSP430InterruptAttr(), handleMsStructAttr(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handleNoAddressSafetyAttr(), handleNoCommonAttr(), handleNoDebugAttr(), handleNoInlineAttr(), handleNoInstrumentFunctionAttr(), handleNonNullAttr(), handleNoReturnAttr(), handleNoThreadSafetyAttr(), handleNothrowAttr(), handleObjCExceptionAttr(), handleObjCGCTypeAttr(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipTypeAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresPropertyDefsAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCRootClassAttr(), HandleOpenCLImageAccessAttribute(), handleOverloadableAttr(), handleOwnershipAttr(), handlePackedAttr(), handleRegparmAttr(), handleReqdWorkGroupSize(), handleReturnsTwiceAttr(), handleSentinelAttr(), handleSharedAttr(), handleTransparentUnionAttr(), handleTrylockFunAttr(), handleUnlockFunAttr(), handleUnusedAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), HandleVectorSizeAttr(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakAttr(), handleWeakImportAttr(), handleWeakRefAttr(), HandleX86ForceAlignArgPointerAttr(), clang::Sema::ProcessDeclAttributeList(), and threadSafetyCheckIsPointer().

const Expr* clang::AttributeList::getMessageExpr ( ) const [inline]

Definition at line 267 of file AttributeList.h.

References getKind().

Referenced by handleAvailabilityAttr().

IdentifierInfo* clang::AttributeList::getName ( ) const [inline]

Definition at line 170 of file AttributeList.h.

Referenced by checkAttrArgsAreLockableObjs(), checkForLockableRecord(), checkIBOutletCommon(), checkUnusedDeclAttributes(), diagnoseBadTypeAttribute(), handleAcquireOrderAttr(), handleAlwaysInlineAttr(), handleAnalyzerNoReturnAttr(), handleCallConvAttr(), handleCFTransferAttr(), handleColdAttr(), handleCommonAttr(), handleConstantAttr(), handleConstructorAttr(), handleDependencyAttr(), handleDestructorAttr(), handleDeviceAttr(), HandleDLLExportAttr(), HandleDLLImportAttr(), handleFormatArgAttr(), handleFormatAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleGuardedVarAttr(), handleHostAttr(), handleHotAttr(), handleIBAction(), handleInitPriorityAttr(), handleLaunchBoundsAttr(), handleLockableAttr(), handleLockFunAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleLocksRequiredAttr(), handleMsStructAttr(), handleNakedAttr(), handleNoAddressSafetyAttr(), handleNoCommonAttr(), handleNoDebugAttr(), handleNoInlineAttr(), handleNoInstrumentFunctionAttr(), handleNonNullAttr(), handleNoReturnAttr(), handleNoThreadSafetyAttr(), handleNSBridgedAttr(), handleNSConsumedAttr(), handleNSConsumesSelfAttr(), handleNSReturnsRetainedAttr(), handleObjCOwnershipAttr(), handleObjCOwnershipTypeAttr(), handleObjCPreciseLifetimeAttr(), handleObjCReturnsInnerPointerAttr(), handleOwnershipAttr(), handlePackedAttr(), handleRegparmAttr(), handleReturnsTwiceAttr(), handleSentinelAttr(), handleSharedAttr(), handleTransparentUnionAttr(), handleTrylockFunAttr(), handleUnlockFunAttr(), handleUnusedAttr(), handleUsedAttr(), handleVecReturnAttr(), handleWarnUnusedResult(), handleWeakAttr(), handleWeakImportAttr(), handleWeakRefAttr(), HandleX86ForceAlignArgPointerAttr(), clang::Sema::ParsedFreeStandingDeclSpec(), ProcessStmtAttribute(), and threadSafetyCheckIsPointer().

AttributeList* clang::AttributeList::getNext ( ) const [inline]
unsigned clang::AttributeList::getNumArgs ( ) const [inline]
SourceLocation clang::AttributeList::getParameterLoc ( ) const [inline]
IdentifierInfo* clang::AttributeList::getParameterName ( ) const [inline]
SourceRange clang::AttributeList::getRange ( ) const [inline]

Definition at line 172 of file AttributeList.h.

Referenced by checkUnusedDeclAttributes(), handleAcquireOrderAttr(), handleAliasAttr(), handleAlignedAttr(), handleAlwaysInlineAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleArcWeakrefUnavailableAttr(), handleAttrWithMessage(), handleAvailabilityAttr(), handleBlocksAttr(), handleCallConvAttr(), handleCFTransferAttr(), handleCleanupAttr(), handleColdAttr(), handleCommonAttr(), handleConstantAttr(), handleConstAttr(), handleConstructorAttr(), handleDestructorAttr(), handleDeviceAttr(), HandleDLLExportAttr(), HandleDLLImportAttr(), handleFallThroughAttr(), handleFormatArgAttr(), handleFormatAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleGuardedVarAttr(), handleHostAttr(), handleHotAttr(), handleIBAction(), handleIBOutlet(), handleIBOutletCollection(), handleInitPriorityAttr(), handleLaunchBoundsAttr(), handleLockableAttr(), handleLockFunAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleLocksRequiredAttr(), handleMallocAttr(), handleMayAliasAttr(), handleModeAttr(), handleMsStructAttr(), handleNakedAttr(), handleNoAddressSafetyAttr(), handleNoCommonAttr(), handleNoDebugAttr(), handleNoInlineAttr(), handleNoInstrumentFunctionAttr(), handleNonNullAttr(), handleNoReturnAttr(), handleNoThreadSafetyAttr(), handleNothrowAttr(), handleNSBridgedAttr(), handleNSConsumedAttr(), handleNSConsumesSelfAttr(), handleNSReturnsRetainedAttr(), handleObjCExceptionAttr(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresPropertyDefsAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCRootClassAttr(), handleOpenCLKernelAttr(), handleOverloadableAttr(), handlePackedAttr(), handlePureAttr(), handleRegparmAttr(), handleReqdWorkGroupSize(), handleReturnsTwiceAttr(), handleSectionAttr(), handleSentinelAttr(), handleSharedAttr(), handleTransparentUnionAttr(), handleTrylockFunAttr(), handleUnlockFunAttr(), handleUnusedAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakAttr(), handleWeakImportAttr(), handleWeakRefAttr(), HandleX86ForceAlignArgPointerAttr(), and ProcessStmtAttribute().

SourceLocation clang::AttributeList::getScopeLoc ( ) const [inline]

Definition at line 176 of file AttributeList.h.

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

IdentifierInfo* clang::AttributeList::getScopeName ( ) const [inline]

Definition at line 175 of file AttributeList.h.

SourceLocation clang::AttributeList::getUnavailableLoc ( ) const [inline]

Definition at line 262 of file AttributeList.h.

References getKind().

Referenced by handleAvailabilityAttr().

bool clang::AttributeList::hasParameterOrArguments ( ) const [inline]

hasParameterOrArguments - Return true if this attribute has a parameter, or has a non empty argument expression list.

Definition at line 201 of file AttributeList.h.

References NumArgs.

Referenced by clang::Sema::CheckNoReturnAttr(), handleAlwaysInlineAttr(), handleConstantAttr(), handleConstAttr(), handleMallocAttr(), handleNothrowAttr(), handleReturnsTwiceAttr(), handleUnusedAttr(), handleUsedAttr(), and handleWeakAttr().

bool clang::AttributeList::hasScope ( ) const [inline]

Definition at line 174 of file AttributeList.h.

bool clang::AttributeList::isCXX0XAttribute ( ) const [inline]

Definition at line 182 of file AttributeList.h.

Referenced by handleAnalyzerNoReturnAttr().

bool clang::AttributeList::isDeclspecAttribute ( ) const [inline]

Definition at line 181 of file AttributeList.h.

Referenced by ProcessDeclAttribute().

bool clang::AttributeList::isInvalid ( ) const [inline]
bool clang::AttributeList::isUsedAsTypeAttr ( ) const [inline]

Definition at line 187 of file AttributeList.h.

Referenced by checkUnusedDeclAttributes(), and takeDeclAttributes().

void clang::AttributeList::setInvalid ( bool  b = true) const [inline]
void clang::AttributeList::setNext ( AttributeList N) [inline]
void clang::AttributeList::setUsedAsTypeAttr ( ) [inline]

Definition at line 188 of file AttributeList.h.

Referenced by processTypeAttrs().


Friends And Related Function Documentation

friend class AttributeFactory [friend]

Definition at line 159 of file AttributeList.h.

friend class AttributePool [friend]

Definition at line 158 of file AttributeList.h.


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