clang  8.0.0svn
Public Member Functions | List of all members
clang::ParsingDeclSpec Class Reference

A class for parsing a DeclSpec. More...

#include "clang/Parse/RAIIObjectsForParser.h"

Inheritance diagram for clang::ParsingDeclSpec:
Inheritance graph
Collaboration diagram for clang::ParsingDeclSpec:
Collaboration graph

Public Member Functions

 ParsingDeclSpec (Parser &P)
 ParsingDeclSpec (Parser &P, ParsingDeclRAIIObject *RAII)
const sema::DelayedDiagnosticPoolgetDelayedDiagnosticPool () const
void complete (Decl *D)
void abort ()
- Public Member Functions inherited from clang::DeclSpec
 DeclSpec (AttributeFactory &attrFactory)
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
bool isTypeRep () const
bool isTypeSpecPipe () const
bool isTypeSpecSat () const
ParsedType getRepAsType () const
DeclgetRepAsDecl () const
ExprgetRepAsExpr () const
CXXScopeSpecgetTypeSpecScope ()
const CXXScopeSpecgetTypeSpecScope () const
SourceRange getSourceRange () const LLVM_READONLY
SourceLocation getBeginLoc () const LLVM_READONLY
SourceLocation getEndLoc () const LLVM_READONLY
SourceLocation getTypeSpecWidthLoc () const
SourceRange getTypeSpecWidthRange () const
SourceLocation getTypeSpecComplexLoc () const
SourceLocation getTypeSpecSignLoc () const
SourceLocation getTypeSpecTypeLoc () const
SourceLocation getAltiVecLoc () const
SourceLocation getTypeSpecSatLoc () const
SourceLocation getTypeSpecTypeNameLoc () const
SourceRange getTypeofParensRange () const
void setTypeofParensRange (SourceRange range)
bool hasAutoTypeSpec () const
bool hasTagDefinition () const
unsigned getTypeQualifiers () const
 getTypeQualifiers - Return a set of TQs. More...
SourceLocation getConstSpecLoc () const
SourceLocation getRestrictSpecLoc () const
SourceLocation getVolatileSpecLoc () const
SourceLocation getAtomicSpecLoc () const
SourceLocation getUnalignedSpecLoc () const
SourceLocation getPipeLoc () const
void ClearTypeQualifiers ()
 Clear out all of the type qualifiers. More...
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. More...
unsigned getParsedSpecifiers () const
 Return a bitmask of which flavors of specifiers this DeclSpec includes. More...
bool isEmpty () const
 isEmpty - Return true if this declaration specifier is completely empty: no tokens were parsed in the production of it. More...
void SetRangeStart (SourceLocation Loc)
void SetRangeEnd (SourceLocation Loc)
bool 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. More...
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)
 These methods set the specified attribute of the DeclSpec, but return true and ignore the request if invalid (e.g. More...
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 SetTypePipe (bool isPipe, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetTypeSpecSat (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
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 (ParsedAttributesView &AL)
 Concatenates two attribute lists. More...
bool hasAttributes () const
ParsedAttributesgetAttributes ()
const ParsedAttributesgetAttributes () const
void takeAttributesFrom (ParsedAttributes &attrs)
void Finish (Sema &S, const PrintingPolicy &Policy)
 Finish - This does final analysis of the declspec, issuing diagnostics for things like "_Imaginary" (lacking an FP type). More...
const WrittenBuiltinSpecsgetWrittenBuiltinSpecs () const
ObjCDeclSpecgetObjCQualifiers () const
void setObjCQualifiers (ObjCDeclSpec *quals)
bool isMissingDeclaratorOk ()
 Checks if this DeclSpec can stand alone, without a Declarator. More...

Additional Inherited Members

- Public Types inherited from clang::DeclSpec
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_unaligned = 8, TQ_atomic = 16
enum  ParsedSpecifiers {
  PQ_None = 0, PQ_StorageClassSpecifier = 1, PQ_TypeSpecifier = 2, PQ_TypeQualifier = 4,
  PQ_FunctionSpecifier = 8
 ParsedSpecifiers - Flags to query which specifiers were applied. More...
typedef ThreadStorageClassSpecifier TSCS
typedef TypeSpecifierWidth TSW
typedef TypeSpecifierSign TSS
typedef TypeSpecifierType TST
- Static Public Member Functions inherited from clang::DeclSpec
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". More...
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 inherited from clang::DeclSpec
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_char8 = clang::TST_char8
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_float16 = clang::TST_Float16
static const TST TST_accum = clang::TST_Accum
static const TST TST_fract = clang::TST_Fract
static const TST TST_float128 = clang::TST_float128
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_auto_type = clang::TST_auto_type
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

A class for parsing a DeclSpec.

Definition at line 176 of file RAIIObjectsForParser.h.

Constructor & Destructor Documentation

◆ ParsingDeclSpec() [1/2]

clang::ParsingDeclSpec::ParsingDeclSpec ( Parser P)

Definition at line 180 of file RAIIObjectsForParser.h.

◆ ParsingDeclSpec() [2/2]

clang::ParsingDeclSpec::ParsingDeclSpec ( Parser P,
ParsingDeclRAIIObject RAII 

Definition at line 183 of file RAIIObjectsForParser.h.

Member Function Documentation

◆ abort()

void clang::ParsingDeclSpec::abort ( )

◆ complete()

void clang::ParsingDeclSpec::complete ( Decl D)

◆ getDelayedDiagnosticPool()

const sema::DelayedDiagnosticPool& clang::ParsingDeclSpec::getDelayedDiagnosticPool ( ) const

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