clang  6.0.0svn
Public Member Functions | List of all members
clang::ParsedAttributes Class Reference

ParsedAttributes - A collection of parsed attributes. More...

#include "clang/Sema/AttributeList.h"

Public Member Functions

 ParsedAttributes (AttributeFactory &factory)
 
 ParsedAttributes (const ParsedAttributes &)=delete
 
AttributePoolgetPool () const
 
bool empty () const
 
void add (AttributeList *newAttr)
 
void addAll (AttributeList *newList)
 
void addAllAtEnd (AttributeList *newList)
 
void set (AttributeList *newList)
 
void takeAllFrom (ParsedAttributes &attrs)
 
void clear ()
 
AttributeListgetList () const
 
void clearListOnly ()
 
AttributeList *& getListRef ()
 Returns a reference to the attribute list. More...
 
AttributeListaddNew (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ArgsUnion *args, unsigned numArgs, AttributeList::Syntax syntax, SourceLocation ellipsisLoc=SourceLocation())
 Add attribute with expression arguments. More...
 
AttributeListaddNew (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *Param, const AvailabilityChange &introduced, const AvailabilityChange &deprecated, const AvailabilityChange &obsoleted, SourceLocation unavailable, const Expr *MessageExpr, AttributeList::Syntax syntax, SourceLocation strict, const Expr *ReplacementExpr)
 Add availability attribute. More...
 
AttributeListaddNew (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *Param1, IdentifierLoc *Param2, IdentifierLoc *Param3, AttributeList::Syntax syntax)
 Add objc_bridge_related attribute. More...
 
AttributeListaddNewTypeTagForDatatype (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *argumentKind, ParsedType matchingCType, bool layoutCompatible, bool mustBeNull, AttributeList::Syntax syntax)
 Add type_tag_for_datatype attribute. More...
 
AttributeListaddNewTypeAttr (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ParsedType typeArg, AttributeList::Syntax syntaxUsed)
 Add an attribute with a single type argument. More...
 
AttributeListaddNewPropertyAttr (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierInfo *getterId, IdentifierInfo *setterId, AttributeList::Syntax syntaxUsed)
 Add microsoft __delspec(property) attribute. More...
 

Detailed Description

ParsedAttributes - A collection of parsed attributes.

Currently we don't differentiate between the various attribute syntaxes, which is basically silly.

Right now this is a very lightweight container, but the expectation is that this will become significantly more serious.

Definition at line 734 of file AttributeList.h.

Constructor & Destructor Documentation

◆ ParsedAttributes() [1/2]

clang::ParsedAttributes::ParsedAttributes ( AttributeFactory factory)
inline

Definition at line 736 of file AttributeList.h.

◆ ParsedAttributes() [2/2]

clang::ParsedAttributes::ParsedAttributes ( const ParsedAttributes )
delete

Member Function Documentation

◆ add()

void clang::ParsedAttributes::add ( AttributeList newAttr)
inline

◆ addAll()

void clang::ParsedAttributes::addAll ( AttributeList newList)
inline

◆ addAllAtEnd()

void clang::ParsedAttributes::addAllAtEnd ( AttributeList newList)
inline

◆ addNew() [1/3]

AttributeList* clang::ParsedAttributes::addNew ( IdentifierInfo attrName,
SourceRange  attrRange,
IdentifierInfo scopeName,
SourceLocation  scopeLoc,
ArgsUnion args,
unsigned  numArgs,
AttributeList::Syntax  syntax,
SourceLocation  ellipsisLoc = SourceLocation() 
)
inline

Add attribute with expression arguments.

Definition at line 797 of file AttributeList.h.

Referenced by attributeParsedArgsUnevaluated(), isAttributeLateParsed(), and IsBuiltInOrStandardCXX11Attribute().

◆ addNew() [2/3]

AttributeList* clang::ParsedAttributes::addNew ( IdentifierInfo attrName,
SourceRange  attrRange,
IdentifierInfo scopeName,
SourceLocation  scopeLoc,
IdentifierLoc Param,
const AvailabilityChange introduced,
const AvailabilityChange deprecated,
const AvailabilityChange obsoleted,
SourceLocation  unavailable,
const Expr MessageExpr,
AttributeList::Syntax  syntax,
SourceLocation  strict,
const Expr ReplacementExpr 
)
inline

Add availability attribute.

Definition at line 810 of file AttributeList.h.

◆ addNew() [3/3]

AttributeList* clang::ParsedAttributes::addNew ( IdentifierInfo attrName,
SourceRange  attrRange,
IdentifierInfo scopeName,
SourceLocation  scopeLoc,
IdentifierLoc Param1,
IdentifierLoc Param2,
IdentifierLoc Param3,
AttributeList::Syntax  syntax 
)
inline

Add objc_bridge_related attribute.

Definition at line 829 of file AttributeList.h.

◆ addNewPropertyAttr()

AttributeList* clang::ParsedAttributes::addNewPropertyAttr ( IdentifierInfo attrName,
SourceRange  attrRange,
IdentifierInfo scopeName,
SourceLocation  scopeLoc,
IdentifierInfo getterId,
IdentifierInfo setterId,
AttributeList::Syntax  syntaxUsed 
)
inline

Add microsoft __delspec(property) attribute.

Definition at line 872 of file AttributeList.h.

◆ addNewTypeAttr()

AttributeList* clang::ParsedAttributes::addNewTypeAttr ( IdentifierInfo attrName,
SourceRange  attrRange,
IdentifierInfo scopeName,
SourceLocation  scopeLoc,
ParsedType  typeArg,
AttributeList::Syntax  syntaxUsed 
)
inline

Add an attribute with a single type argument.

Definition at line 860 of file AttributeList.h.

Referenced by attributeParsedArgsUnevaluated().

◆ addNewTypeTagForDatatype()

AttributeList* clang::ParsedAttributes::addNewTypeTagForDatatype ( IdentifierInfo attrName,
SourceRange  attrRange,
IdentifierInfo scopeName,
SourceLocation  scopeLoc,
IdentifierLoc argumentKind,
ParsedType  matchingCType,
bool  layoutCompatible,
bool  mustBeNull,
AttributeList::Syntax  syntax 
)
inline

Add type_tag_for_datatype attribute.

Definition at line 843 of file AttributeList.h.

◆ clear()

void clang::ParsedAttributes::clear ( )
inline

Definition at line 787 of file AttributeList.h.

Referenced by clang::Declarator::clear().

◆ clearListOnly()

void clang::ParsedAttributes::clearListOnly ( )
inline

Definition at line 790 of file AttributeList.h.

◆ empty()

bool clang::ParsedAttributes::empty ( ) const
inline

◆ getList()

AttributeList* clang::ParsedAttributes::getList ( ) const
inline

◆ getListRef()

AttributeList*& clang::ParsedAttributes::getListRef ( )
inline

Returns a reference to the attribute list.

Try not to introduce dependencies on this method, it may not be long-lived.

Definition at line 794 of file AttributeList.h.

Referenced by distributeObjCPointerTypeAttrFromDeclarator(), and clang::Declarator::getAttrListRef().

◆ getPool()

AttributePool& clang::ParsedAttributes::getPool ( ) const
inline

◆ set()

void clang::ParsedAttributes::set ( AttributeList newList)
inline

Definition at line 777 of file AttributeList.h.

◆ takeAllFrom()

void clang::ParsedAttributes::takeAllFrom ( ParsedAttributes attrs)
inline

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