clang 20.0.0git
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]

Public Member Functions

 ParsedAttributes (AttributeFactory &factory)
 
 ParsedAttributes (const ParsedAttributes &)=delete
 
ParsedAttributesoperator= (const ParsedAttributes &)=delete
 
 ParsedAttributes (ParsedAttributes &&G)=default
 
AttributePoolgetPool () const
 
void takeAllFrom (ParsedAttributes &Other)
 
void takeOneFrom (ParsedAttributes &Other, ParsedAttr *PA)
 
void clear ()
 
ParsedAttraddNew (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ArgsUnion *args, unsigned numArgs, ParsedAttr::Form form, SourceLocation ellipsisLoc=SourceLocation())
 Add attribute with expression arguments.
 
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::Form form, SourceLocation strict, const Expr *ReplacementExpr, IdentifierLoc *EnvironmentLoc)
 Add availability attribute.
 
ParsedAttraddNew (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *Param1, IdentifierLoc *Param2, IdentifierLoc *Param3, ParsedAttr::Form form)
 Add objc_bridge_related attribute.
 
ParsedAttraddNewTypeTagForDatatype (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *argumentKind, ParsedType matchingCType, bool layoutCompatible, bool mustBeNull, ParsedAttr::Form form)
 Add type_tag_for_datatype attribute.
 
ParsedAttraddNewTypeAttr (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ParsedType typeArg, ParsedAttr::Form formUsed, SourceLocation ellipsisLoc=SourceLocation())
 Add an attribute with a single type argument.
 
ParsedAttraddNewPropertyAttr (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierInfo *getterId, IdentifierInfo *setterId, ParsedAttr::Form formUsed)
 Add microsoft __delspec(property) attribute.
 
- 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
 
const ParsedAttrgetMSPropertyAttr () const
 
bool hasMSPropertyAttr () const
 

Additional Inherited Members

- Static Public Member Functions inherited from clang::ParsedAttributesView
static const ParsedAttributesViewnone ()
 
- Public Attributes inherited from clang::ParsedAttributesView
SourceRange Range
 

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

Constructor & Destructor Documentation

◆ ParsedAttributes() [1/3]

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

Definition at line 958 of file ParsedAttr.h.

◆ ParsedAttributes() [2/3]

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

◆ ParsedAttributes() [3/3]

clang::ParsedAttributes::ParsedAttributes ( ParsedAttributes &&  G)
default

Member Function Documentation

◆ addNew() [1/3]

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

Add attribute with expression arguments.

Definition at line 989 of file ParsedAttr.h.

References clang::ast_matchers::attr.

◆ 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::Form  form,
SourceLocation  strict,
const Expr ReplacementExpr,
IdentifierLoc EnvironmentLoc 
)
inline

Add availability attribute.

Definition at line 1000 of file ParsedAttr.h.

References clang::ast_matchers::attr.

◆ addNew() [3/3]

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

Add objc_bridge_related attribute.

Definition at line 1018 of file ParsedAttr.h.

References clang::ast_matchers::attr.

◆ addNewPropertyAttr()

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

Add microsoft __delspec(property) attribute.

Definition at line 1056 of file ParsedAttr.h.

References clang::ast_matchers::attr.

◆ addNewTypeAttr()

ParsedAttr * clang::ParsedAttributes::addNewTypeAttr ( IdentifierInfo attrName,
SourceRange  attrRange,
IdentifierInfo scopeName,
SourceLocation  scopeLoc,
ParsedType  typeArg,
ParsedAttr::Form  formUsed,
SourceLocation  ellipsisLoc = SourceLocation() 
)
inline

Add an attribute with a single type argument.

Definition at line 1043 of file ParsedAttr.h.

References clang::ast_matchers::attr.

◆ addNewTypeTagForDatatype()

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

Add type_tag_for_datatype attribute.

Definition at line 1030 of file ParsedAttr.h.

References clang::ast_matchers::attr.

◆ clear()

void clang::ParsedAttributes::clear ( )
inline

Definition at line 982 of file ParsedAttr.h.

References Range.

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

◆ getPool()

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

◆ operator=()

ParsedAttributes & clang::ParsedAttributes::operator= ( const ParsedAttributes )
delete

◆ takeAllFrom()

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

◆ takeOneFrom()

void clang::ParsedAttributes::takeOneFrom ( ParsedAttributes Other,
ParsedAttr PA 
)
inline

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