clang API Documentation
Attr - This represents one attribute. More...
#include <Attr.h>
Public Member Functions | |
void * | operator new (size_t Bytes, ASTContext &C, size_t Alignment=16) throw () |
void | operator delete (void *Ptr, ASTContext &C, size_t Alignment) throw () |
attr::Kind | getKind () const |
unsigned | getSpellingListIndex () const |
virtual const char * | getSpelling () const =0 |
SourceLocation | getLocation () const |
SourceRange | getRange () const |
void | setRange (SourceRange R) |
bool | isInherited () const |
bool | isImplicit () const |
Returns true if the attribute has been implicitly created instead of explicitly written by the user. | |
void | setImplicit (bool I) |
void | setPackExpansion (bool PE) |
bool | isPackExpansion () const |
virtual Attr * | clone (ASTContext &C) const =0 |
virtual bool | isLateParsed () const |
virtual void | printPretty (raw_ostream &OS, const PrintingPolicy &Policy) const =0 |
virtual bool | duplicatesAllowed () const |
By default, attributes cannot be duplicated when being merged; however, an attribute can override this. Returns true if the attribute can be duplicated when merging. | |
Protected Member Functions | |
virtual | ~Attr () |
void * | operator new (size_t bytes) throw () |
void | operator delete (void *data) throw () |
Attr (attr::Kind AK, SourceRange R, unsigned SpellingListIndex=0) | |
Protected Attributes | |
unsigned | SpellingListIndex: 4 |
bool | Inherited: 1 |
bool | IsPackExpansion: 1 |
bool | Implicit: 1 |
Attr::~Attr | ( | ) | [protected, virtual] |
Definition at line 21 of file AttrImpl.cpp.
clang::Attr::Attr | ( | attr::Kind | AK, |
SourceRange | R, | ||
unsigned | SpellingListIndex = 0 |
||
) | [inline, protected] |
virtual Attr* clang::Attr::clone | ( | ASTContext & | C | ) | const [pure virtual] |
virtual bool clang::Attr::duplicatesAllowed | ( | ) | const [inline, virtual] |
By default, attributes cannot be duplicated when being merged; however, an attribute can override this. Returns true if the attribute can be duplicated when merging.
Definition at line 116 of file Attr.h.
Referenced by mergeDeclAttribute().
attr::Kind clang::Attr::getKind | ( | ) | const [inline] |
Definition at line 83 of file Attr.h.
Referenced by clang::Sema::ActOnBaseSpecifier(), clang::ast_matchers::AST_MATCHER_P(), checkDLLAttribute(), checkNewAttributesAfterDef(), clang::InheritableAttr::classof(), clang::InheritableParamAttr::classof(), DeclHasAttr(), clang::threadSafety::ThreadSafetyAnalyzer::getEdgeLockset(), GetFullTypeForDeclarator(), propagateDLLAttrToBaseClassTemplate(), and clang::TreeTransform< Derived >::TransformAttr().
SourceLocation clang::Attr::getLocation | ( | ) | const [inline] |
Definition at line 90 of file Attr.h.
References clang::SourceRange::getBegin().
Referenced by checkAttributesAfterMerging(), checkDLLAttribute(), checkNewAttributesAfterDef(), clang::Sema::FinalizeDeclaration(), propagateDLLAttrToBaseClassTemplate(), and clang::threadSafety::ThreadSafetyAnalyzer::runAnalysis().
SourceRange clang::Attr::getRange | ( | ) | const [inline] |
virtual const char* clang::Attr::getSpelling | ( | ) | const [pure virtual] |
Referenced by clang::FormatASTNodeDiagnosticArgument().
unsigned clang::Attr::getSpellingListIndex | ( | ) | const [inline] |
Definition at line 87 of file Attr.h.
References SpellingListIndex.
Referenced by mergeDeclAttribute().
bool clang::Attr::isImplicit | ( | ) | const [inline] |
bool clang::Attr::isInherited | ( | ) | const [inline] |
Definition at line 94 of file Attr.h.
References Inherited.
Referenced by checkDLLAttribute(), and clang::Sema::FinalizeDeclaration().
virtual bool clang::Attr::isLateParsed | ( | ) | const [inline, virtual] |
bool clang::Attr::isPackExpansion | ( | ) | const [inline] |
Definition at line 102 of file Attr.h.
References IsPackExpansion.
void clang::Attr::operator delete | ( | void * | data | ) | throw () [inline, protected] |
Definition at line 61 of file Attr.h.
Referenced by operator delete().
void clang::Attr::operator delete | ( | void * | Ptr, |
ASTContext & | C, | ||
size_t | Alignment | ||
) | throw () [inline] |
Definition at line 71 of file Attr.h.
References AttributeLangSupport::C, and operator delete().
void* clang::Attr::operator new | ( | size_t | bytes | ) | throw () [inline, protected] |
Definition at line 58 of file Attr.h.
Referenced by operator new().
void* clang::Attr::operator new | ( | size_t | Bytes, |
ASTContext & | C, | ||
size_t | Alignment = 16 |
||
) | throw () [inline] |
Definition at line 67 of file Attr.h.
References operator new().
virtual void clang::Attr::printPretty | ( | raw_ostream & | OS, |
const PrintingPolicy & | Policy | ||
) | const [pure virtual] |
void clang::Attr::setImplicit | ( | bool | I | ) | [inline] |
void clang::Attr::setPackExpansion | ( | bool | PE | ) | [inline] |
Definition at line 101 of file Attr.h.
References IsPackExpansion.
void clang::Attr::setRange | ( | SourceRange | R | ) | [inline] |
bool clang::Attr::Implicit [protected] |
Definition at line 54 of file Attr.h.
Referenced by isImplicit(), and setImplicit().
bool clang::Attr::Inherited [protected] |
Definition at line 52 of file Attr.h.
Referenced by isInherited(), and clang::InheritableAttr::setInherited().
bool clang::Attr::IsPackExpansion [protected] |
Definition at line 53 of file Attr.h.
Referenced by isPackExpansion(), and setPackExpansion().
unsigned clang::Attr::SpellingListIndex [protected] |
An index into the spelling list of an attribute defined in Attr.td file.
Definition at line 51 of file Attr.h.
Referenced by getSpellingListIndex().