clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
clang::DeclSpec Class Reference

Captures information about "declaration specifiers". More...

#include <DeclSpec.h>

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

List of all members.

Public Types

enum  SCS {
  SCS_unspecified = 0, SCS_typedef, SCS_extern, SCS_static,
  SCS_auto, SCS_register, SCS_private_extern, SCS_mutable
}
 storage-class-specifier More...
enum  TSC { TSC_unspecified, TSC_imaginary, TSC_complex }
enum  TQ {
  TQ_unspecified = 0, TQ_const = 1, TQ_restrict = 2, TQ_volatile = 4,
  TQ_atomic = 8
}
enum  ParsedSpecifiers {
  PQ_None = 0, PQ_StorageClassSpecifier = 1, PQ_TypeSpecifier = 2, PQ_TypeQualifier = 4,
  PQ_FunctionSpecifier = 8
}
typedef ThreadStorageClassSpecifier TSCS
typedef TypeSpecifierWidth TSW
typedef TypeSpecifierSign TSS
typedef TypeSpecifierType TST
typedef Decl *const * ProtocolQualifierListTy

Public Member Functions

 DeclSpec (AttributeFactory &attrFactory)
 ~DeclSpec ()
SCS getStorageClassSpec () const
TSCS getThreadStorageClassSpec () const
bool isExternInLinkageSpec () const
void setExternInLinkageSpec (bool Value)
SourceLocation getStorageClassSpecLoc () const
SourceLocation getThreadStorageClassSpecLoc () const
void ClearStorageClassSpecs ()
void ClearTypeSpecType ()
TSW getTypeSpecWidth () const
TSC getTypeSpecComplex () const
TSS getTypeSpecSign () const
TST getTypeSpecType () const
bool isTypeAltiVecVector () const
bool isTypeAltiVecPixel () const
bool isTypeAltiVecBool () const
bool isTypeSpecOwned () const
ParsedType getRepAsType () const
DeclgetRepAsDecl () const
ExprgetRepAsExpr () const
CXXScopeSpecgetTypeSpecScope ()
const CXXScopeSpecgetTypeSpecScope () const
const SourceRangegetSourceRange () const LLVM_READONLY
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
SourceLocation getTypeSpecWidthLoc () const
SourceLocation getTypeSpecComplexLoc () const
SourceLocation getTypeSpecSignLoc () const
SourceLocation getTypeSpecTypeLoc () const
SourceLocation getAltiVecLoc () const
SourceLocation getTypeSpecTypeNameLoc () const
SourceRange getTypeofParensRange () const
void setTypeofParensRange (SourceRange range)
bool containsPlaceholderType () const
bool hasTagDefinition () const
unsigned getTypeQualifiers () const
 getTypeQualifiers - Return a set of TQs.
SourceLocation getConstSpecLoc () const
SourceLocation getRestrictSpecLoc () const
SourceLocation getVolatileSpecLoc () const
SourceLocation getAtomicSpecLoc () const
void ClearTypeQualifiers ()
 Clear out all of the type qualifiers.
bool isInlineSpecified () const
SourceLocation getInlineSpecLoc () const
bool isVirtualSpecified () const
SourceLocation getVirtualSpecLoc () const
bool isExplicitSpecified () const
SourceLocation getExplicitSpecLoc () const
bool isNoreturnSpecified () const
SourceLocation getNoreturnSpecLoc () const
void ClearFunctionSpecs ()
bool hasTypeSpecifier () const
 Return true if any type-specifier has been found.
unsigned getParsedSpecifiers () const
 Return a bitmask of which flavors of specifiers this DeclSpec includes.
bool isEmpty () const
void SetRangeStart (SourceLocation Loc)
void SetRangeEnd (SourceLocation Loc)
bool SetStorageClassSpec (Sema &S, SCS SC, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetStorageClassSpecThread (TSCS TSC, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool SetTypeSpecWidth (TSW W, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetTypeSpecComplex (TSC C, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool SetTypeSpecSign (TSS S, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool SetTypeSpecType (TST T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, ParsedType Rep, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, Decl *Rep, bool Owned, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation TagKwLoc, SourceLocation TagNameLoc, const char *&PrevSpec, unsigned &DiagID, ParsedType Rep, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation TagKwLoc, SourceLocation TagNameLoc, const char *&PrevSpec, unsigned &DiagID, Decl *Rep, bool Owned, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, Expr *Rep, const PrintingPolicy &policy)
bool SetTypeAltiVecVector (bool isAltiVecVector, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetTypeAltiVecPixel (bool isAltiVecPixel, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetTypeAltiVecBool (bool isAltiVecBool, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetTypeSpecError ()
void UpdateDeclRep (Decl *Rep)
void UpdateTypeRep (ParsedType Rep)
void UpdateExprRep (Expr *Rep)
bool SetTypeQual (TQ T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const LangOptions &Lang)
bool setFunctionSpecInline (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool setFunctionSpecForceInline (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool setFunctionSpecVirtual (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool setFunctionSpecExplicit (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool setFunctionSpecNoreturn (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool SetFriendSpec (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool setModulePrivateSpec (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool SetConstexprSpec (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool isFriendSpecified () const
SourceLocation getFriendSpecLoc () const
bool isModulePrivateSpecified () const
SourceLocation getModulePrivateSpecLoc () const
bool isConstexprSpecified () const
SourceLocation getConstexprSpecLoc () const
void ClearConstexprSpec ()
AttributePoolgetAttributePool () const
void addAttributes (AttributeList *AL)
 Concatenates two attribute lists.
bool hasAttributes () const
ParsedAttributesgetAttributes ()
const ParsedAttributesgetAttributes () const
void takeAttributesFrom (ParsedAttributes &attrs)
ProtocolQualifierListTy getProtocolQualifiers () const
SourceLocationgetProtocolLocs () const
unsigned getNumProtocolQualifiers () const
SourceLocation getProtocolLAngleLoc () const
void setProtocolQualifiers (Decl *const *Protos, unsigned NP, SourceLocation *ProtoLocs, SourceLocation LAngleLoc)
void Finish (DiagnosticsEngine &D, Preprocessor &PP, const PrintingPolicy &Policy)
const WrittenBuiltinSpecsgetWrittenBuiltinSpecs () const
ObjCDeclSpecgetObjCQualifiers () const
void setObjCQualifiers (ObjCDeclSpec *quals)
bool isMissingDeclaratorOk ()
 Checks if this DeclSpec can stand alone, without a Declarator.

Static Public Member Functions

static bool isDeclRep (TST T)
static const char * getSpecifierName (DeclSpec::TST T, const PrintingPolicy &Policy)
 Turn a type-specifier-type into a string like "_Bool" or "union".
static const char * getSpecifierName (DeclSpec::TQ Q)
static const char * getSpecifierName (DeclSpec::TSS S)
static const char * getSpecifierName (DeclSpec::TSC C)
static const char * getSpecifierName (DeclSpec::TSW W)
static const char * getSpecifierName (DeclSpec::SCS S)
static const char * getSpecifierName (DeclSpec::TSCS S)

Static Public Attributes

static const TSCS TSCS_unspecified = clang::TSCS_unspecified
static const TSCS TSCS___thread = clang::TSCS___thread
static const TSCS TSCS_thread_local = clang::TSCS_thread_local
static const TSCS TSCS__Thread_local = clang::TSCS__Thread_local
static const TSW TSW_unspecified = clang::TSW_unspecified
static const TSW TSW_short = clang::TSW_short
static const TSW TSW_long = clang::TSW_long
static const TSW TSW_longlong = clang::TSW_longlong
static const TSS TSS_unspecified = clang::TSS_unspecified
static const TSS TSS_signed = clang::TSS_signed
static const TSS TSS_unsigned = clang::TSS_unsigned
static const TST TST_unspecified = clang::TST_unspecified
static const TST TST_void = clang::TST_void
static const TST TST_char = clang::TST_char
static const TST TST_wchar = clang::TST_wchar
static const TST TST_char16 = clang::TST_char16
static const TST TST_char32 = clang::TST_char32
static const TST TST_int = clang::TST_int
static const TST TST_int128 = clang::TST_int128
static const TST TST_half = clang::TST_half
static const TST TST_float = clang::TST_float
static const TST TST_double = clang::TST_double
static const TST TST_bool = clang::TST_bool
static const TST TST_decimal32 = clang::TST_decimal32
static const TST TST_decimal64 = clang::TST_decimal64
static const TST TST_decimal128 = clang::TST_decimal128
static const TST TST_enum = clang::TST_enum
static const TST TST_union = clang::TST_union
static const TST TST_struct = clang::TST_struct
static const TST TST_interface = clang::TST_interface
static const TST TST_class = clang::TST_class
static const TST TST_typename = clang::TST_typename
static const TST TST_typeofType = clang::TST_typeofType
static const TST TST_typeofExpr = clang::TST_typeofExpr
static const TST TST_decltype = clang::TST_decltype
static const TST TST_decltype_auto = clang::TST_decltype_auto
static const TST TST_underlyingType = clang::TST_underlyingType
static const TST TST_auto = clang::TST_auto
static const TST TST_unknown_anytype = clang::TST_unknown_anytype
static const TST TST_atomic = clang::TST_atomic
static const TST TST_error = clang::TST_error

Detailed Description

Captures information about "declaration specifiers".

"Declaration specifiers" encompasses storage-class-specifiers, type-specifiers, type-qualifiers, and function-specifiers.

Definition at line 232 of file DeclSpec.h.


Member Typedef Documentation

Definition at line 739 of file DeclSpec.h.

Definition at line 249 of file DeclSpec.h.

Definition at line 269 of file DeclSpec.h.

Definition at line 275 of file DeclSpec.h.

Definition at line 256 of file DeclSpec.h.


Member Enumeration Documentation

ParsedSpecifiers - Flags to query which specifiers were applied. This is returned by getParsedSpecifiers.

Enumerator:
PQ_None 
PQ_StorageClassSpecifier 
PQ_TypeSpecifier 
PQ_TypeQualifier 
PQ_FunctionSpecifier 

Definition at line 320 of file DeclSpec.h.

storage-class-specifier

Note:
The order of these enumerators is important for diagnostics.
Enumerator:
SCS_unspecified 
SCS_typedef 
SCS_extern 
SCS_static 
SCS_auto 
SCS_register 
SCS_private_extern 
SCS_mutable 

Definition at line 236 of file DeclSpec.h.

Enumerator:
TQ_unspecified 
TQ_const 
TQ_restrict 
TQ_volatile 
TQ_atomic 

Definition at line 308 of file DeclSpec.h.

Enumerator:
TSC_unspecified 
TSC_imaginary 
TSC_complex 

Definition at line 262 of file DeclSpec.h.


Constructor & Destructor Documentation

clang::DeclSpec::DeclSpec ( AttributeFactory attrFactory) [inline]

Definition at line 419 of file DeclSpec.h.

Definition at line 446 of file DeclSpec.h.


Member Function Documentation

Concatenates two attribute lists.

The GCC attribute syntax allows for the following:

 short __attribute__(( unused, deprecated ))
 int __attribute__(( may_alias, aligned(16) )) var;

This declares 4 attributes using 2 lists. The following syntax is also allowed and equivalent to the previous declaration.

 short __attribute__((unused)) __attribute__((deprecated))
 int __attribute__((may_alias)) __attribute__((aligned(16))) var;

Definition at line 726 of file DeclSpec.h.

References clang::ParsedAttributes::addAll().

Referenced by clang::Parser::ParseTypeName().

Definition at line 700 of file DeclSpec.h.

Referenced by clang::Sema::ActOnCXXMemberDeclarator().

Definition at line 572 of file DeclSpec.h.

Clear out all of the type qualifiers.

Definition at line 547 of file DeclSpec.h.

Referenced by clang::Sema::BuildAnonymousStructOrUnion().

Definition at line 473 of file DeclSpec.h.

References TST_unspecified.

void DeclSpec::Finish ( DiagnosticsEngine D,
Preprocessor PP,
const PrintingPolicy Policy 
)

Finish - This does final analysis of the declspec, issuing diagnostics for things like "_Imaginary" (lacking an FP type). After calling this method, DeclSpec is guaranteed self-consistent, even if an error occurred.

Finish - This does final analysis of the declspec, rejecting things like "_Imaginary" (lacking an FP type). This returns a diagnostic to issue or diag::NUM_DIAGNOSTICS if there is no error. After calling this method, DeclSpec is guaranteed self-consistent, even if an error occurred.

Definition at line 929 of file DeclSpec.cpp.

References ClearStorageClassSpecs(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), Diag(), getExplicitSpecLoc(), clang::Preprocessor::getLangOpts(), clang::Preprocessor::getLocForEndOfToken(), clang::Preprocessor::getSourceManager(), getSpecifierName(), getStorageClassSpec(), getStorageClassSpecLoc(), clang::Preprocessor::getTargetInfo(), getThreadStorageClassSpec(), getThreadStorageClassSpecLoc(), getTypeSpecComplexLoc(), getVirtualSpecLoc(), clang::TargetInfo::hasFeature(), clang::SourceManager::isBeforeInTranslationUnit(), isDeclRep(), isExplicitSpecified(), isFriendSpecified(), clang::SourceLocation::isInvalid(), isInvalid(), isVirtualSpecified(), SCS_auto, SCS_extern, SCS_private_extern, SCS_static, SCS_unspecified, TSC_unspecified, TSCS_unspecified, TSS_unsigned, TSS_unspecified, TST_auto, TST_char, TST_char16, TST_char32, TST_decltype_auto, TST_double, TST_float, TST_int, TST_int128, TST_unspecified, TST_wchar, TSW_long, TSW_longlong, TSW_short, and TSW_unspecified.

Definition at line 511 of file DeclSpec.h.

Definition at line 705 of file DeclSpec.h.

References clang::ParsedAttributes::getPool().

Referenced by takeDeclAttributes().

Definition at line 733 of file DeclSpec.h.

Definition at line 505 of file DeclSpec.h.

References clang::SourceRange::getEnd().

Referenced by GetFullTypeForDeclarator().

Definition at line 744 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType().

Definition at line 762 of file DeclSpec.h.

Return a bitmask of which flavors of specifiers this DeclSpec includes.

getParsedSpecifiers - Return a bitmask of which flavors of specifiers this declaration specifier includes.

Definition at line 361 of file DeclSpec.cpp.

References hasTypeSpecifier(), PQ_FunctionSpecifier, PQ_StorageClassSpecifier, PQ_TypeQualifier, PQ_TypeSpecifier, SCS_unspecified, TQ_unspecified, and TSCS_unspecified.

Referenced by clang::Sema::CodeCompleteDeclSpec(), and isEmpty().

Definition at line 747 of file DeclSpec.h.

Definition at line 743 of file DeclSpec.h.

Definition at line 740 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType().

Decl* clang::DeclSpec::getRepAsDecl ( ) const [inline]
Expr* clang::DeclSpec::getRepAsExpr ( ) const [inline]
const SourceRange& clang::DeclSpec::getSourceRange ( ) const [inline]
const char * DeclSpec::getSpecifierName ( DeclSpec::TST  T,
const PrintingPolicy Policy 
) [static]
const char * DeclSpec::getSpecifierName ( DeclSpec::TQ  Q) [static]

Definition at line 482 of file DeclSpec.cpp.

References TQ_atomic, TQ_const, TQ_restrict, TQ_unspecified, and TQ_volatile.

const char * DeclSpec::getSpecifierName ( DeclSpec::TSS  S) [static]

Definition at line 436 of file DeclSpec.cpp.

References TSS_signed, TSS_unsigned, and TSS_unspecified.

const char * DeclSpec::getSpecifierName ( DeclSpec::TSC  C) [static]

Definition at line 426 of file DeclSpec.cpp.

References TSC_complex, TSC_imaginary, and TSC_unspecified.

const char * DeclSpec::getSpecifierName ( DeclSpec::TSW  W) [static]

Definition at line 416 of file DeclSpec.cpp.

References TSW_long, TSW_longlong, TSW_short, and TSW_unspecified.

const char * DeclSpec::getSpecifierName ( DeclSpec::SCS  S) [static]
const char * DeclSpec::getSpecifierName ( DeclSpec::TSCS  S) [static]

Definition at line 406 of file DeclSpec.cpp.

References TSCS___thread, TSCS__Thread_local, TSCS_thread_local, and TSCS_unspecified.

Definition at line 518 of file DeclSpec.h.

Definition at line 508 of file DeclSpec.h.

Referenced by Finish().

Definition at line 500 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), and clang::Sema::ParsedFreeStandingDeclSpec().

Definition at line 501 of file DeclSpec.h.

Definition at line 509 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType().

Definition at line 513 of file DeclSpec.h.

References isDeclRep(), and TST_typename.

Referenced by ConvertDeclSpecToType().

Definition at line 480 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), and hasTypeSpecifier().

Definition at line 507 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType().

Definition at line 758 of file DeclSpec.h.

Definition at line 730 of file DeclSpec.h.

References clang::ParsedAttributes::empty().

Definition at line 352 of file DeclSpec.cpp.

References getRepAsDecl().

Referenced by GetFullTypeForDeclarator().

static bool clang::DeclSpec::isDeclRep ( TST  T) [inline, static]
bool clang::DeclSpec::isEmpty ( ) const [inline]

isEmpty - Return true if this declaration specifier is completely empty: no tokens were parsed in the production of it.

Definition at line 599 of file DeclSpec.h.

References getParsedSpecifiers(), and PQ_None.

Referenced by ConvertDeclSpecToType().

Checks if this DeclSpec can stand alone, without a Declarator.

Only tag declspecs can stand alone.

Definition at line 1193 of file DeclSpec.cpp.

References getRepAsDecl(), getTypeSpecType(), isDeclRep(), and SCS_typedef.

Referenced by clang::Sema::ParsedFreeStandingDeclSpec().

Definition at line 486 of file DeclSpec.h.

Definition at line 485 of file DeclSpec.h.

Definition at line 484 of file DeclSpec.h.

Referenced by clang::Sema::CodeCompleteDeclSpec().

bool DeclSpec::SetConstexprSpec ( SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID 
)

Definition at line 881 of file DeclSpec.cpp.

Definition at line 456 of file DeclSpec.h.

bool DeclSpec::SetFriendSpec ( SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID 
)

Definition at line 851 of file DeclSpec.cpp.

bool DeclSpec::setFunctionSpecExplicit ( SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID 
)

Definition at line 821 of file DeclSpec.cpp.

bool DeclSpec::setFunctionSpecForceInline ( SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID 
)

Definition at line 794 of file DeclSpec.cpp.

bool DeclSpec::setFunctionSpecInline ( SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID 
)

Definition at line 780 of file DeclSpec.cpp.

bool DeclSpec::setFunctionSpecNoreturn ( SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID 
)

Definition at line 836 of file DeclSpec.cpp.

bool DeclSpec::setFunctionSpecVirtual ( SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID 
)

Definition at line 806 of file DeclSpec.cpp.

bool DeclSpec::setModulePrivateSpec ( SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID 
)

Definition at line 869 of file DeclSpec.cpp.

References isModulePrivateSpecified().

Definition at line 763 of file DeclSpec.h.

void DeclSpec::setProtocolQualifiers ( Decl *const *  Protos,
unsigned  NP,
SourceLocation ProtoLocs,
SourceLocation  LAngleLoc 
)

Definition at line 895 of file DeclSpec.cpp.

Definition at line 604 of file DeclSpec.h.

References clang::SourceRange::setEnd().

Referenced by clang::Sema::ActOnFinishKNRParamDeclarations().

Definition at line 603 of file DeclSpec.h.

References clang::SourceRange::setBegin().

Referenced by clang::Sema::ActOnFinishKNRParamDeclarations().

bool DeclSpec::SetStorageClassSpec ( Sema S,
SCS  SC,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID,
const PrintingPolicy Policy 
)

These methods set the specified attribute of the DeclSpec and return false if there was no error. If an error occurs (for example, if we tried to set "auto" on a spec with "extern" already set), they return true and set PrevSpec and DiagID such that Diag(Loc, DiagID) << PrevSpec; will yield a useful result.

TODO: use a more general approach that still allows these diagnostics to be ignored when desired.

Definition at line 493 of file DeclSpec.cpp.

References BadSpecifier(), clang::Sema::getLangOpts(), clang::Sema::getOpenCLOptions(), getSpecifierName(), isInvalid(), SCS_auto, SCS_extern, SCS_private_extern, SCS_register, SCS_static, SCS_typedef, SCS_unspecified, SetTypeSpecType(), TST_auto, and TST_unspecified.

Referenced by clang::Sema::ActOnCXXMemberDeclarator(), and clang::Sema::BuildAnonymousStructOrUnion().

bool DeclSpec::SetStorageClassSpecThread ( TSCS  TSC,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID 
)

Definition at line 554 of file DeclSpec.cpp.

References BadSpecifier(), and TSCS_unspecified.

bool DeclSpec::SetTypeAltiVecBool ( bool  isAltiVecBool,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID,
const PrintingPolicy Policy 
)

Definition at line 732 of file DeclSpec.cpp.

References getSpecifierName(), and TST_unspecified.

bool DeclSpec::SetTypeAltiVecPixel ( bool  isAltiVecPixel,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID,
const PrintingPolicy Policy 
)

Definition at line 717 of file DeclSpec.cpp.

References getSpecifierName(), and TST_unspecified.

bool DeclSpec::SetTypeAltiVecVector ( bool  isAltiVecVector,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID,
const PrintingPolicy Policy 
)

Definition at line 704 of file DeclSpec.cpp.

References getSpecifierName(), and TST_unspecified.

Definition at line 519 of file DeclSpec.h.

bool DeclSpec::SetTypeQual ( TQ  T,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID,
const LangOptions Lang 
)
bool DeclSpec::SetTypeSpecComplex ( TSC  C,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID 
)

Definition at line 583 of file DeclSpec.cpp.

References BadSpecifier(), AttributeLangSupport::C, and TSC_unspecified.

Definition at line 747 of file DeclSpec.cpp.

References TST_error.

bool DeclSpec::SetTypeSpecSign ( TSS  S,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID 
)

Definition at line 593 of file DeclSpec.cpp.

References BadSpecifier(), S, and TSS_unspecified.

bool DeclSpec::SetTypeSpecType ( TST  T,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID,
const PrintingPolicy Policy 
)
bool DeclSpec::SetTypeSpecType ( TST  T,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID,
ParsedType  Rep,
const PrintingPolicy Policy 
)

Definition at line 603 of file DeclSpec.cpp.

References SetTypeSpecType().

bool DeclSpec::SetTypeSpecType ( TST  T,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID,
Decl Rep,
bool  Owned,
const PrintingPolicy Policy 
)

Definition at line 652 of file DeclSpec.cpp.

References SetTypeSpecType().

bool DeclSpec::SetTypeSpecType ( TST  T,
SourceLocation  TagKwLoc,
SourceLocation  TagNameLoc,
const char *&  PrevSpec,
unsigned DiagID,
ParsedType  Rep,
const PrintingPolicy Policy 
)

Definition at line 611 of file DeclSpec.cpp.

References getSpecifierName(), TST_unspecified, and TypeRep.

bool DeclSpec::SetTypeSpecType ( TST  T,
SourceLocation  TagKwLoc,
SourceLocation  TagNameLoc,
const char *&  PrevSpec,
unsigned DiagID,
Decl Rep,
bool  Owned,
const PrintingPolicy Policy 
)

Definition at line 660 of file DeclSpec.cpp.

References DeclRep, getSpecifierName(), isDeclRep(), and TST_unspecified.

bool DeclSpec::SetTypeSpecType ( TST  T,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID,
Expr Rep,
const PrintingPolicy policy 
)

Definition at line 632 of file DeclSpec.cpp.

References ExprRep, getSpecifierName(), and TST_unspecified.

bool DeclSpec::SetTypeSpecWidth ( TSW  W,
SourceLocation  Loc,
const char *&  PrevSpec,
unsigned DiagID,
const PrintingPolicy Policy 
)

These methods set the specified attribute of the DeclSpec, but return true and ignore the request if invalid (e.g. "extern" then "auto" is specified).

Definition at line 568 of file DeclSpec.cpp.

References BadSpecifier(), TSW_long, TSW_longlong, and TSW_unspecified.

Definition at line 735 of file DeclSpec.h.

References clang::ParsedAttributes::takeAllFrom().

void clang::DeclSpec::UpdateDeclRep ( Decl Rep) [inline]

Definition at line 657 of file DeclSpec.h.

References DeclRep, and isDeclRep().

void clang::DeclSpec::UpdateExprRep ( Expr Rep) [inline]

Definition at line 665 of file DeclSpec.h.

References ExprRep.

Referenced by RebuildDeclaratorInCurrentInstantiation().

Definition at line 661 of file DeclSpec.h.

References TypeRep.

Referenced by RebuildDeclaratorInCurrentInstantiation().


Member Data Documentation

Definition at line 362 of file DeclSpec.h.

Referenced by getRepAsDecl(), SetTypeSpecType(), and UpdateDeclRep().

Definition at line 363 of file DeclSpec.h.

Referenced by getRepAsExpr(), SetTypeSpecType(), and UpdateExprRep().

Definition at line 251 of file DeclSpec.h.

Referenced by getSpecifierName().

Definition at line 253 of file DeclSpec.h.

Referenced by getSpecifierName().

Definition at line 252 of file DeclSpec.h.

Referenced by clang::Sema::ActOnVariableDeclarator(), and getSpecifierName().

Definition at line 271 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), and getSpecifierName().

Definition at line 272 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), Finish(), and getSpecifierName().

Definition at line 287 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), getSpecifierName(), and SetTypeSpecType().

Definition at line 278 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), Finish(), and getSpecifierName().

Definition at line 280 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), Finish(), and getSpecifierName().

Definition at line 281 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), Finish(), and getSpecifierName().

Definition at line 290 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), and getSpecifierName().

Definition at line 288 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), and getSpecifierName().

Definition at line 289 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), and getSpecifierName().

Definition at line 286 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), Finish(), and getSpecifierName().

Definition at line 285 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), Finish(), and getSpecifierName().

Definition at line 284 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), and getSpecifierName().

Definition at line 283 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), Finish(), and getSpecifierName().

Definition at line 303 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), and getSpecifierName().

Definition at line 277 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), and getSpecifierName().

Definition at line 279 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), Finish(), and getSpecifierName().

Definition at line 259 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), Finish(), getSpecifierName(), and SetTypeSpecWidth().

Definition at line 260 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), Finish(), getSpecifierName(), and SetTypeSpecWidth().

Definition at line 258 of file DeclSpec.h.

Referenced by ConvertDeclSpecToType(), Finish(), and getSpecifierName().

Definition at line 361 of file DeclSpec.h.

Referenced by getRepAsType(), SetTypeSpecType(), and UpdateTypeRep().


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