clang  10.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Friends | List of all members
clang::AttributeCommonInfo Class Reference

#include "clang/Basic/AttributeCommonInfo.h"

Inheritance diagram for clang::AttributeCommonInfo:
Inheritance graph
[legend]
Collaboration diagram for clang::AttributeCommonInfo:
Collaboration graph
[legend]

Public Types

enum  Syntax {
  AS_GNU, AS_CXX11, AS_C2x, AS_Declspec,
  AS_Microsoft, AS_Keyword, AS_Pragma, AS_ContextSensitiveKeyword
}
 The style used to specify an attribute. More...
 
enum  Kind { NoSemaHandlerAttribute, IgnoredAttribute, UnknownAttribute }
 

Public Member Functions

 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 IdentifierInfogetAttrName () const
 
SourceLocation getLoc () const
 
SourceRange getRange () const
 
void setRange (SourceRange R)
 
bool hasScope () const
 
const IdentifierInfogetScopeName () const
 
SourceLocation getScopeLoc () const
 
bool isDeclspecAttribute () const
 
bool isMicrosoftAttribute () const
 
bool isGNUScope () const
 
bool isAlignasAttribute () const
 
bool isCXX11Attribute () const
 
bool isC2xAttribute () const
 
bool isKeywordAttribute () const
 
bool isContextSensitiveKeywordAttribute () const
 
unsigned getAttributeSpellingListIndex () const
 
void setAttributeSpellingListIndex (unsigned V)
 

Static Public Member Functions

static Kind getParsedKind (const IdentifierInfo *Name, const IdentifierInfo *Scope, Syntax SyntaxUsed)
 

Protected Member Functions

bool isAttributeSpellingListCalculated () const
 

Static Protected Attributes

static constexpr unsigned SpellingNotCalculated = 0xf
 

Friends

class clang::ASTRecordWriter
 

Detailed Description

Definition at line 22 of file AttributeCommonInfo.h.

Member Enumeration Documentation

◆ Kind

Enumerator
NoSemaHandlerAttribute 
IgnoredAttribute 
UnknownAttribute 

Definition at line 52 of file AttributeCommonInfo.h.

◆ Syntax

The style used to specify an attribute.

Enumerator
AS_GNU 

attribute((...))

AS_CXX11 

[[...]]

AS_C2x 

[[...]]

AS_Declspec 

__declspec(...)

AS_Microsoft 

[uuid("...")] class Foo

AS_Keyword 

__ptr16, alignas(...), etc.

AS_Pragma 

#pragma ...

AS_ContextSensitiveKeyword 

Context-sensitive version of a keyword attribute.

Definition at line 25 of file AttributeCommonInfo.h.

Constructor & Destructor Documentation

◆ AttributeCommonInfo() [1/10]

clang::AttributeCommonInfo::AttributeCommonInfo ( SourceRange  AttrRange)
inline

Definition at line 76 of file AttributeCommonInfo.h.

Referenced by AttributeCommonInfo().

◆ AttributeCommonInfo() [2/10]

clang::AttributeCommonInfo::AttributeCommonInfo ( SourceLocation  AttrLoc)
inline

Definition at line 80 of file AttributeCommonInfo.h.

◆ AttributeCommonInfo() [3/10]

clang::AttributeCommonInfo::AttributeCommonInfo ( const IdentifierInfo AttrName,
const IdentifierInfo ScopeName,
SourceRange  AttrRange,
SourceLocation  ScopeLoc,
Syntax  SyntaxUsed 
)
inline

Definition at line 84 of file AttributeCommonInfo.h.

◆ AttributeCommonInfo() [4/10]

clang::AttributeCommonInfo::AttributeCommonInfo ( const IdentifierInfo AttrName,
const IdentifierInfo ScopeName,
SourceRange  AttrRange,
SourceLocation  ScopeLoc,
Kind  AttrKind,
Syntax  SyntaxUsed 
)
inline

Definition at line 92 of file AttributeCommonInfo.h.

◆ AttributeCommonInfo() [5/10]

clang::AttributeCommonInfo::AttributeCommonInfo ( const IdentifierInfo AttrName,
const IdentifierInfo ScopeName,
SourceRange  AttrRange,
SourceLocation  ScopeLoc,
Kind  AttrKind,
Syntax  SyntaxUsed,
unsigned  Spelling 
)
inline

Definition at line 99 of file AttributeCommonInfo.h.

◆ AttributeCommonInfo() [6/10]

clang::AttributeCommonInfo::AttributeCommonInfo ( const IdentifierInfo AttrName,
SourceRange  AttrRange,
Syntax  SyntaxUsed 
)
inline

Definition at line 107 of file AttributeCommonInfo.h.

◆ AttributeCommonInfo() [7/10]

clang::AttributeCommonInfo::AttributeCommonInfo ( SourceRange  AttrRange,
Kind  K,
Syntax  SyntaxUsed 
)
inline

Definition at line 113 of file AttributeCommonInfo.h.

◆ AttributeCommonInfo() [8/10]

clang::AttributeCommonInfo::AttributeCommonInfo ( SourceRange  AttrRange,
Kind  K,
Syntax  SyntaxUsed,
unsigned  Spelling 
)
inline

Definition at line 118 of file AttributeCommonInfo.h.

References AttributeCommonInfo().

◆ AttributeCommonInfo() [9/10]

clang::AttributeCommonInfo::AttributeCommonInfo ( AttributeCommonInfo &&  )
default

◆ AttributeCommonInfo() [10/10]

clang::AttributeCommonInfo::AttributeCommonInfo ( const AttributeCommonInfo )
default

Member Function Documentation

◆ getAttributeSpellingListIndex()

unsigned clang::AttributeCommonInfo::getAttributeSpellingListIndex ( ) const
inline

◆ getAttrName()

const IdentifierInfo* clang::AttributeCommonInfo::getAttrName ( ) const
inline

◆ getLoc()

SourceLocation clang::AttributeCommonInfo::getLoc ( ) const
inline

◆ getParsedKind() [1/2]

Kind clang::AttributeCommonInfo::getParsedKind ( ) const
inline

◆ getParsedKind() [2/2]

AttributeCommonInfo::Kind AttributeCommonInfo::getParsedKind ( const IdentifierInfo Name,
const IdentifierInfo Scope,
Syntax  SyntaxUsed 
)
static

Definition at line 78 of file Attributes.cpp.

◆ getRange()

SourceRange clang::AttributeCommonInfo::getRange ( ) const
inline

◆ getScopeLoc()

SourceLocation clang::AttributeCommonInfo::getScopeLoc ( ) const
inline

Definition at line 135 of file AttributeCommonInfo.h.

Referenced by clang::ASTRecordWriter::AddAttr().

◆ getScopeName()

const IdentifierInfo* clang::AttributeCommonInfo::getScopeName ( ) const
inline

Definition at line 134 of file AttributeCommonInfo.h.

Referenced by clang::ASTRecordWriter::AddAttr().

◆ getSyntax()

Syntax clang::AttributeCommonInfo::getSyntax ( ) const
inline

Definition at line 127 of file AttributeCommonInfo.h.

Referenced by clang::ASTRecordWriter::AddAttr().

◆ hasScope()

bool clang::AttributeCommonInfo::hasScope ( ) const
inline

Definition at line 133 of file AttributeCommonInfo.h.

◆ isAlignasAttribute()

bool clang::AttributeCommonInfo::isAlignasAttribute ( ) const
inline

Definition at line 142 of file AttributeCommonInfo.h.

References getParsedKind(), and isKeywordAttribute().

Referenced by isCXX11Attribute().

◆ isAttributeSpellingListCalculated()

bool clang::AttributeCommonInfo::isAttributeSpellingListCalculated ( ) const
inlineprotected

Definition at line 184 of file AttributeCommonInfo.h.

References SpellingNotCalculated.

Referenced by getAttributeSpellingListIndex().

◆ isC2xAttribute()

bool clang::AttributeCommonInfo::isC2xAttribute ( ) const
inline

Definition at line 151 of file AttributeCommonInfo.h.

References AS_C2x.

◆ isContextSensitiveKeywordAttribute()

bool clang::AttributeCommonInfo::isContextSensitiveKeywordAttribute ( ) const
inline

◆ isCXX11Attribute()

bool clang::AttributeCommonInfo::isCXX11Attribute ( ) const
inline

Definition at line 147 of file AttributeCommonInfo.h.

References AS_CXX11, and isAlignasAttribute().

Referenced by distributeFunctionTypeAttrFromDeclSpec().

◆ isDeclspecAttribute()

bool clang::AttributeCommonInfo::isDeclspecAttribute ( ) const
inline

Definition at line 137 of file AttributeCommonInfo.h.

References AS_Declspec.

◆ isGNUScope()

bool AttributeCommonInfo::isGNUScope ( ) const

Definition at line 71 of file Attributes.cpp.

References clang::IdentifierInfo::isStr().

Referenced by isMicrosoftAttribute().

◆ isKeywordAttribute()

bool clang::AttributeCommonInfo::isKeywordAttribute ( ) const
inline

Definition at line 153 of file AttributeCommonInfo.h.

References AS_ContextSensitiveKeyword, and AS_Keyword.

Referenced by isAlignasAttribute().

◆ isMicrosoftAttribute()

bool clang::AttributeCommonInfo::isMicrosoftAttribute ( ) const
inline

Definition at line 138 of file AttributeCommonInfo.h.

References AS_Microsoft, and isGNUScope().

◆ setAttributeSpellingListIndex()

void clang::AttributeCommonInfo::setAttributeSpellingListIndex ( unsigned  V)
inline

Definition at line 168 of file AttributeCommonInfo.h.

References getParsedKind(), and V.

◆ setRange()

void clang::AttributeCommonInfo::setRange ( SourceRange  R)
inline

Definition at line 131 of file AttributeCommonInfo.h.

Referenced by clang::ASTImporter::Import().

Friends And Related Function Documentation

◆ clang::ASTRecordWriter

friend class clang::ASTRecordWriter
friend

Definition at line 179 of file AttributeCommonInfo.h.

Member Data Documentation

◆ SpellingNotCalculated

constexpr unsigned clang::AttributeCommonInfo::SpellingNotCalculated = 0xf
staticprotected

Definition at line 73 of file AttributeCommonInfo.h.

Referenced by isAttributeSpellingListCalculated().


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