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

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

#include "clang/Sema/ParsedAttr.h"

Inheritance diagram for clang::ParsedAttributes:
Inheritance graph
[legend]
Collaboration diagram for clang::ParsedAttributes:
Collaboration graph
[legend]

Public Member Functions

 ParsedAttributes (AttributeFactory &factory)
 
 ParsedAttributes (const ParsedAttributes &)=delete
 
AttributePoolgetPool () const
 
void takeAllFrom (ParsedAttributes &attrs)
 
void clear ()
 
ParsedAttraddNew (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ArgsUnion *args, unsigned numArgs, ParsedAttr::Syntax syntax, SourceLocation ellipsisLoc=SourceLocation())
 Add attribute with expression arguments. More...
 
ParsedAttraddNew (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *Param, const AvailabilityChange &introduced, const AvailabilityChange &deprecated, const AvailabilityChange &obsoleted, SourceLocation unavailable, const Expr *MessageExpr, ParsedAttr::Syntax syntax, SourceLocation strict, const Expr *ReplacementExpr)
 Add availability attribute. More...
 
ParsedAttraddNew (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *Param1, IdentifierLoc *Param2, IdentifierLoc *Param3, ParsedAttr::Syntax syntax)
 Add objc_bridge_related attribute. More...
 
ParsedAttraddNewTypeTagForDatatype (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *argumentKind, ParsedType matchingCType, bool layoutCompatible, bool mustBeNull, ParsedAttr::Syntax syntax)
 Add type_tag_for_datatype attribute. More...
 
ParsedAttraddNewTypeAttr (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ParsedType typeArg, ParsedAttr::Syntax syntaxUsed)
 Add an attribute with a single type argument. More...
 
ParsedAttraddNewPropertyAttr (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierInfo *getterId, IdentifierInfo *setterId, ParsedAttr::Syntax syntaxUsed)
 Add microsoft __delspec(property) attribute. More...
 
- Public Member Functions inherited from clang::ParsedAttributesView
bool empty () const
 
SizeType size () const
 
ParsedAttroperator[] (SizeType pos)
 
const ParsedAttroperator[] (SizeType pos) const
 
void addAtEnd (ParsedAttr *newAttr)
 
void remove (ParsedAttr *ToBeRemoved)
 
void clearListOnly ()
 
void addAll (iterator B, iterator E)
 
void addAll (const_iterator B, const_iterator E)
 
void addAllAtEnd (iterator B, iterator E)
 
void addAllAtEnd (const_iterator B, const_iterator E)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
ParsedAttrfront ()
 
const ParsedAttrfront () const
 
ParsedAttrback ()
 
const ParsedAttrback () const
 
bool hasAttribute (ParsedAttr::Kind K) const
 

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 850 of file ParsedAttr.h.

Constructor & Destructor Documentation

◆ ParsedAttributes() [1/2]

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

Definition at line 852 of file ParsedAttr.h.

◆ ParsedAttributes() [2/2]

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

Member Function Documentation

◆ addNew() [1/3]

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

Add attribute with expression arguments.

Definition at line 869 of file ParsedAttr.h.

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

◆ addNew() [2/3]

ParsedAttr* 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,
ParsedAttr::Syntax  syntax,
SourceLocation  strict,
const Expr ReplacementExpr 
)
inline

Add availability attribute.

Definition at line 881 of file ParsedAttr.h.

◆ addNew() [3/3]

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

Add objc_bridge_related attribute.

Definition at line 897 of file ParsedAttr.h.

◆ addNewPropertyAttr()

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

Add microsoft __delspec(property) attribute.

Definition at line 934 of file ParsedAttr.h.

◆ addNewTypeAttr()

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

Add an attribute with a single type argument.

Definition at line 922 of file ParsedAttr.h.

Referenced by attributeParsedArgsUnevaluated().

◆ addNewTypeTagForDatatype()

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

Add type_tag_for_datatype attribute.

Definition at line 909 of file ParsedAttr.h.

◆ clear()

void clang::ParsedAttributes::clear ( )
inline

Definition at line 863 of file ParsedAttr.h.

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

◆ getPool()

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

◆ takeAllFrom()

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

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