clang
10.0.0svn
|
A class for parsing a DeclSpec. More...
#include "clang/Parse/RAIIObjectsForParser.h"
Public Member Functions | |
ParsingDeclSpec (Parser &P) | |
ParsingDeclSpec (Parser &P, ParsingDeclRAIIObject *RAII) | |
const sema::DelayedDiagnosticPool & | getDelayedDiagnosticPool () const |
void | complete (Decl *D) |
void | abort () |
![]() | |
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 |
Decl * | getRepAsDecl () const |
Expr * | getRepAsExpr () const |
CXXScopeSpec & | getTypeSpecScope () |
const CXXScopeSpec & | getTypeSpecScope () 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 |
ExplicitSpecifier | getExplicitSpecifier () const |
bool | isVirtualSpecified () const |
SourceLocation | getVirtualSpecLoc () const |
bool | hasExplicitSpecifier () const |
SourceLocation | getExplicitSpecLoc () const |
SourceRange | getExplicitSpecRange () const |
bool | isNoreturnSpecified () const |
SourceLocation | getNoreturnSpecLoc () const |
void | ClearFunctionSpecs () |
void | forEachCVRUQualifier (llvm::function_ref< void(TQ, StringRef, SourceLocation)> Handle) |
This method calls the passed in handler on each CVRU qual being set. More... | |
void | forEachQualifier (llvm::function_ref< void(TQ, StringRef, SourceLocation)> Handle) |
This method calls the passed in handler on each qual being set. More... | |
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) |
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, ExplicitSpecifier ExplicitSpec, SourceLocation CloseParenLoc) |
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 (ConstexprSpecKind ConstexprKind, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID) |
bool | isFriendSpecified () const |
SourceLocation | getFriendSpecLoc () const |
bool | isModulePrivateSpecified () const |
SourceLocation | getModulePrivateSpecLoc () const |
ConstexprSpecKind | getConstexprSpecifier () const |
SourceLocation | getConstexprSpecLoc () const |
bool | hasConstexprSpecifier () const |
void | ClearConstexprSpec () |
AttributePool & | getAttributePool () const |
void | addAttributes (ParsedAttributesView &AL) |
Concatenates two attribute lists. More... | |
bool | hasAttributes () const |
ParsedAttributes & | getAttributes () |
const ParsedAttributes & | getAttributes () 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 WrittenBuiltinSpecs & | getWrittenBuiltinSpecs () const |
ObjCDeclSpec * | getObjCQualifiers () const |
void | setObjCQualifiers (ObjCDeclSpec *quals) |
bool | isMissingDeclaratorOk () |
Checks if this DeclSpec can stand alone, without a Declarator. More... | |
Additional Inherited Members | |
![]() | |
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 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 const char * | getSpecifierName (ConstexprSpecKind C) |
![]() | |
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 |
A class for parsing a DeclSpec.
Definition at line 175 of file RAIIObjectsForParser.h.
|
inline |
Definition at line 179 of file RAIIObjectsForParser.h.
|
inline |
Definition at line 182 of file RAIIObjectsForParser.h.
|
inline |
Definition at line 194 of file RAIIObjectsForParser.h.
References clang::ParsingDeclRAIIObject::abort().
Referenced by clang::Parser::ParseTopLevelDecl().
|
inline |
Definition at line 190 of file RAIIObjectsForParser.h.
References clang::ParsingDeclRAIIObject::complete().
Referenced by clang::Parser::ParseTopLevelDecl().
|
inline |
Definition at line 186 of file RAIIObjectsForParser.h.
References clang::ParsingDeclRAIIObject::getDelayedDiagnosticPool().