|
clang 24.0.0git
|
A late-parsed attribute that will be applied as a type attribute. More...
#include "clang/Parse/Parser.h"
Public Member Functions | |
| LateParsedTypeAttribute (Parser *P, IdentifierInfo &Name, SourceLocation Loc) | |
| void | ParseLexedAttributes () override |
| void | ParseInto (ParsedAttributes &OutAttrs) |
| Parse this late-parsed type attribute and store results in OutAttrs. | |
| Public Member Functions inherited from clang::LateParsedAttribute | |
| LateParsedAttribute (Parser *P, IdentifierInfo &Name, SourceLocation Loc) | |
| void | addDecl (Decl *D) |
| Kind | getKind () const |
| Public Member Functions inherited from clang::LateParsedDeclaration | |
| virtual | ~LateParsedDeclaration () |
| virtual void | ParseLexedMethodDeclarations () |
| virtual void | ParseLexedMemberInitializers () |
| virtual void | ParseLexedMethodDefs () |
| virtual void | ParseLexedPragmas () |
Static Public Member Functions | |
| static bool | classof (const LateParsedAttribute *LA) |
| Static Public Member Functions inherited from clang::LateParsedAttribute | |
| static bool | classof (const LateParsedAttribute *LA) |
Public Attributes | |
| BoundsAttributedType * | TypeToComplete = nullptr |
| The type built for this attribute during type construction, still missing the argument that hasn't been parsed yet. | |
| Public Attributes inherited from clang::LateParsedAttribute | |
| Parser * | Self |
| CachedTokens | Toks |
| IdentifierInfo & | AttrName |
| IdentifierInfo * | MacroII = nullptr |
| SourceLocation | AttrNameLoc |
| SmallVector< Decl *, 2 > | Decls |
| SmallVector< ParmVarDecl *, 4 > | ProtoParams |
| Parameters of the prototype the attribute was written on, kept because late parsing runs after their scope is popped and the arguments may name one: 'void (*unlock)(struct BDev *bdev) UNLOCK_FUNCTION(bdev->lock)'. | |
Additional Inherited Members | |
| Public Types inherited from clang::LateParsedAttribute | |
| enum class | Kind { Declaration , Type } |
| Protected Member Functions inherited from clang::LateParsedAttribute | |
| LateParsedAttribute (Parser *P, IdentifierInfo &Name, SourceLocation Loc, Kind K) | |
A late-parsed attribute that will be applied as a type attribute.
Unlike LateParsedAttribute (which applies to declarations via ActOnFinishDelayedAttribute), this stores cached tokens that are parsed during type construction when the placeholder LateParsedAttrType is replaced with a concrete type (e.g., CountAttributedType).
|
inlineexplicit |
Definition at line 250 of file Parser.h.
References clang::LateParsedAttribute::LateParsedAttribute(), and clang::LateParsedAttribute::Type.
|
inlinestatic |
Definition at line 261 of file Parser.h.
References clang::LateParsedAttribute::getKind(), clang::LateParsedAttribute::LateParsedAttribute(), and clang::LateParsedAttribute::Type.
| void LateParsedTypeAttribute::ParseInto | ( | ParsedAttributes & | OutAttrs | ) |
Parse this late-parsed type attribute and store results in OutAttrs.
This method can be called from Sema during type transformation to parse the cached tokens and produce the final attribute.
Definition at line 4984 of file ParseDecl.cpp.
References clang::LateParsedAttribute::Self.
|
overridevirtual |
Reimplemented from clang::LateParsedAttribute.
Definition at line 313 of file ParseCXXInlineMethods.cpp.
| BoundsAttributedType* clang::LateParsedTypeAttribute::TypeToComplete = nullptr |
The type built for this attribute during type construction, still missing the argument that hasn't been parsed yet.
Filled in by Parser::ProcessLateParsedTypeAttrCallback and completed once the enclosing scope makes the argument parseable. Null if type construction rejected the attribute.
Held as the base class so the parser stays agnostic about which bounds attribute this is; Sema dispatches on the concrete kind when completing.