clang
15.0.0git
|
Attr - This represents one attribute. More...
#include "clang/AST/Attr.h"
Public Member Functions | |
void * | operator new (size_t Bytes, ASTContext &C, size_t Alignment=8) noexcept |
void | operator delete (void *Ptr, ASTContext &C, size_t Alignment) noexcept |
attr::Kind | getKind () const |
unsigned | getSpellingListIndex () const |
const char * | getSpelling () const |
SourceLocation | getLocation () const |
bool | isInherited () const |
bool | isImplicit () const |
Returns true if the attribute has been implicitly created instead of explicitly written by the user. More... | |
void | setImplicit (bool I) |
void | setPackExpansion (bool PE) |
bool | isPackExpansion () const |
Attr * | clone (ASTContext &C) const |
bool | isLateParsed () const |
void | printPretty (raw_ostream &OS, const PrintingPolicy &Policy) const |
![]() | |
AttributeCommonInfo (SourceRange AttrRange) | |
AttributeCommonInfo (SourceLocation AttrLoc) | |
AttributeCommonInfo (const IdentifierInfo *AttrName, const IdentifierInfo *ScopeName, SourceRange AttrRange, SourceLocation ScopeLoc, Syntax SyntaxUsed) | |
AttributeCommonInfo (const IdentifierInfo *AttrName, const IdentifierInfo *ScopeName, SourceRange AttrRange, SourceLocation ScopeLoc, Kind AttrKind, Syntax SyntaxUsed) | |
AttributeCommonInfo (const IdentifierInfo *AttrName, const IdentifierInfo *ScopeName, SourceRange AttrRange, SourceLocation ScopeLoc, Kind AttrKind, Syntax SyntaxUsed, unsigned Spelling) | |
AttributeCommonInfo (const IdentifierInfo *AttrName, SourceRange AttrRange, Syntax SyntaxUsed) | |
AttributeCommonInfo (SourceRange AttrRange, Kind K, Syntax SyntaxUsed) | |
AttributeCommonInfo (SourceRange AttrRange, Kind K, Syntax SyntaxUsed, unsigned Spelling) | |
AttributeCommonInfo (AttributeCommonInfo &&)=default | |
AttributeCommonInfo (const AttributeCommonInfo &)=default | |
Kind | getParsedKind () const |
Syntax | getSyntax () const |
const IdentifierInfo * | getAttrName () const |
SourceLocation | getLoc () const |
SourceRange | getRange () const |
void | setRange (SourceRange R) |
bool | hasScope () const |
const IdentifierInfo * | getScopeName () const |
SourceLocation | getScopeLoc () const |
std::string | getNormalizedFullName () const |
Gets the normalized full name, which consists of both scope and name and with surrounding underscores removed as appropriate (e.g. More... | |
bool | isDeclspecAttribute () const |
bool | isMicrosoftAttribute () const |
bool | isGNUScope () const |
bool | isClangScope () const |
bool | isAlignasAttribute () const |
bool | isCXX11Attribute () const |
bool | isC2xAttribute () const |
bool | isStandardAttributeSyntax () const |
The attribute is spelled [[]] in either C or C++ mode, including standard attributes spelled with a keyword, like alignas. More... | |
bool | isGNUAttribute () const |
bool | isKeywordAttribute () const |
bool | isContextSensitiveKeywordAttribute () const |
unsigned | getAttributeSpellingListIndex () const |
void | setAttributeSpellingListIndex (unsigned V) |
Static Public Member Functions | |
static StringRef | getDocumentation (attr::Kind) |
![]() | |
static Kind | getParsedKind (const IdentifierInfo *Name, const IdentifierInfo *Scope, Syntax SyntaxUsed) |
Protected Member Functions | |
void * | operator new (size_t bytes) noexcept |
void | operator delete (void *data) noexcept |
Attr (ASTContext &Context, const AttributeCommonInfo &CommonInfo, attr::Kind AK, bool IsLateParsed) | |
![]() | |
bool | isAttributeSpellingListCalculated () const |
Protected Attributes | |
unsigned | Inherited: 1 |
An index into the spelling list of an attribute defined in Attr.td file. More... | |
unsigned | IsPackExpansion: 1 |
unsigned | Implicit: 1 |
unsigned | IsLateParsed: 1 |
unsigned | InheritEvenIfAlreadyPresent: 1 |
Additional Inherited Members | |
![]() | |
enum | Syntax { AS_GNU, AS_CXX11, AS_C2x, AS_Declspec, AS_Microsoft, AS_Keyword, AS_Pragma, AS_ContextSensitiveKeyword, AS_HLSLSemantic } |
The style used to specify an attribute. More... | |
enum | Kind { NoSemaHandlerAttribute, IgnoredAttribute, UnknownAttribute } |
![]() | |
static constexpr unsigned | SpellingNotCalculated = 0xf |
|
inlineprotected |
Attr* clang::Attr::clone | ( | ASTContext & | C | ) | const |
|
static |
Definition at line 23 of file AttrDocTable.cpp.
References AttrDoc.
|
inline |
Definition at line 81 of file Attr.h.
Referenced by clang::ASTRecordWriter::AddAttr(), clang::ast_matchers::AST_MATCHER_P(), attrToRetainOwnershipKind(), clang::Sema::checkClassLevelDLLAttribute(), clang::TypeAttr::classof(), clang::StmtAttr::classof(), clang::InheritableAttr::classof(), clang::DeclOrStmtAttr::classof(), clang::InheritableParamAttr::classof(), clang::ParameterABIAttr::classof(), DeclHasAttr(), clang::ParameterABIAttr::getABI(), getCCTypeAttr(), clang::ASTNodeKind::getFromNode(), clang::ASTImporter::Import(), clang::TreeTransform< Derived >::TransformAttr(), clang::attrvisitor::Base< llvm::make_const_ptr, JSONNodeDumper, void, ParamTys... >::Visit(), clang::TextNodeDumper::Visit(), and clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 88 of file Attr.h.
References clang::SourceRange::getBegin(), and clang::AttributeCommonInfo::getRange().
Referenced by clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::FinalizeDeclaration(), clang::TypeLoc::findNullabilityLoc(), clang::Sema::InstantiateDefaultCtorDefaultArgs(), and clang::Sema::propagateDLLAttrToBaseClassTemplate().
const char* clang::Attr::getSpelling | ( | ) | const |
Referenced by clang::Sema::CheckParmsForFunctionDef().
|
inline |
Definition at line 83 of file Attr.h.
References clang::AttributeCommonInfo::getAttributeSpellingListIndex().
|
inline |
Returns true if the attribute has been implicitly created instead of explicitly written by the user.
Definition at line 94 of file Attr.h.
References Implicit.
Referenced by clang::TextNodeDumper::Visit(), and clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 90 of file Attr.h.
References Inherited.
Referenced by clang::Decl::addAttr(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::FinalizeDeclaration(), clang::TextNodeDumper::Visit(), and clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 103 of file Attr.h.
References IsLateParsed.
|
inline |
Definition at line 98 of file Attr.h.
References IsPackExpansion.
|
inlineprotectednoexcept |
|
inlinenoexcept |
|
inlineprotectednoexcept |
|
inlinenoexcept |
void clang::Attr::printPretty | ( | raw_ostream & | OS, |
const PrintingPolicy & | Policy | ||
) | const |
|
inline |
Definition at line 95 of file Attr.h.
References Implicit.
Referenced by AttrImporter::importAttr().
|
inline |
Definition at line 97 of file Attr.h.
References IsPackExpansion.
Referenced by AttrImporter::importAttr().
|
protected |
Definition at line 50 of file Attr.h.
Referenced by isImplicit(), and setImplicit().
|
protected |
An index into the spelling list of an attribute defined in Attr.td file.
Definition at line 48 of file Attr.h.
Referenced by isInherited(), and clang::InheritableAttr::setInherited().
|
protected |
Definition at line 54 of file Attr.h.
Referenced by clang::InheritableAttr::InheritableAttr(), and clang::InheritableAttr::shouldInheritEvenIfAlreadyPresent().
|
protected |
Definition at line 53 of file Attr.h.
Referenced by isLateParsed().
|
protected |
Definition at line 49 of file Attr.h.
Referenced by isPackExpansion(), and setPackExpansion().