clang 10.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:
[legend]
Collaboration diagram for clang::ParsedAttributes:
[legend]

## Public Member Functions
| ParsedAttributes (AttributeFactory &factory)
| ParsedAttributes (const ParsedAttributes &)=delete
AttributePool & | getPool () const
void | takeAllFrom (ParsedAttributes &attrs)
void | takeOneFrom (ParsedAttributes &Attrs, ParsedAttr *PA)
void | clear ()
ParsedAttr * | addNew (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ArgsUnion *args, unsigned numArgs, ParsedAttr::Syntax syntax, SourceLocation ellipsisLoc=SourceLocation())
| Add attribute with expression arguments. More...
ParsedAttr * | 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)
| Add availability attribute. More...
ParsedAttr * | addNew (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *Param1, IdentifierLoc *Param2, IdentifierLoc *Param3, ParsedAttr::Syntax syntax)
| Add objc_bridge_related attribute. More...
ParsedAttr * | addNewTypeTagForDatatype (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...
ParsedAttr * | addNewTypeAttr (IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ParsedType typeArg, ParsedAttr::Syntax syntaxUsed)
| Add an attribute with a single type argument. More...
ParsedAttr * | addNewPropertyAttr (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
ParsedAttr & | operator[] (SizeType pos)
const ParsedAttr & | operator[] (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
ParsedAttr & | front ()
const ParsedAttr & | front () const
ParsedAttr & | back ()
const ParsedAttr & | back () 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 824 of file ParsedAttr.h.

## Constructor & Destructor Documentation

## ◆ ParsedAttributes() [1/2]

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

Definition at line 826 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 850 of file ParsedAttr.h.

Referenced by attributeParsedArgsUnevaluated(), FindLocsWithCommonFileID(), 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 862 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 878 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 915 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 903 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 890 of file ParsedAttr.h.

## ◆ clear()

void clang::ParsedAttributes::clear | ( |  | ) |
| inline

Definition at line 844 of file ParsedAttr.h.

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

## ◆ getPool()

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

Definition at line 829 of file ParsedAttr.h.

Referenced by addContextSensitiveTypeNullability(), clang::DeclSpec::getAttributePool(), clang::Declarator::getAttributePool(), takeDeclAttributes(), and takeOneFrom().

## ◆ takeAllFrom()

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

Definition at line 831 of file ParsedAttr.h.

References clang::ParsedAttributesView::begin(), clang::ParsedAttributesView::clearListOnly(), and clang::ParsedAttributesView::end().

Referenced by clang::DeclaratorChunk::getFunction(), clang::Declarator::takeAttributes(), and clang::DeclSpec::takeAttributesFrom().

## ◆ takeOneFrom()

void clang::ParsedAttributes::takeOneFrom | ( | ParsedAttributes & | Attrs,
|  | ParsedAttr * | PA
| ) |  |
| inline

Definition at line 837 of file ParsedAttr.h.

References getPool(), and clang::ParsedAttributesView::remove().

Referenced by distributeObjCPointerTypeAttrFromDeclarator().

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

- include/clang/Sema/ParsedAttr.h