clang 19.0.0git
Macros | Functions
ParseExprCXX.cpp File Reference
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/ExprCXX.h"
#include "clang/Basic/PrettyStackTrace.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Lex/LiteralSupport.h"
#include "clang/Parse/ParseDiagnostic.h"
#include "clang/Parse/Parser.h"
#include "clang/Parse/RAIIObjectsForParser.h"
#include "clang/Sema/DeclSpec.h"
#include "clang/Sema/EnterExpressionEvaluationContext.h"
#include "clang/Sema/ParsedTemplate.h"
#include "clang/Sema/Scope.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include <numeric>
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/OperatorKinds.def"
#include "clang/Basic/TransformTypeTraits.def"
#include "clang/Basic/TokenKinds.def"

Go to the source code of this file.

Macros

#define GENERIC_IMAGE_TYPE(ImgType, Id)
 
#define OVERLOADED_OPERATOR(Name, Spelling, Token, Unary, Binary, MemberOnly)
 
#define OVERLOADED_OPERATOR_MULTI(Name, Spelling, Unary, Binary, MemberOnly)
 
#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait)   case tok::kw___##Trait:
 
#define TYPE_TRAIT_1(Spelling, Name, Key)   case tok::kw_ ## Spelling: return UTT_ ## Name;
 
#define TYPE_TRAIT_2(Spelling, Name, Key)   case tok::kw_ ## Spelling: return BTT_ ## Name;
 
#define TYPE_TRAIT_N(Spelling, Name, Key)    case tok::kw_ ## Spelling: return TT_ ## Name;
 
#define ARRAY_TYPE_TRAIT(Spelling, Name, Key)
 
#define EXPRESSION_TRAIT(Spelling, Name, Key)
 

Functions

static int SelectDigraphErrorMessage (tok::TokenKind Kind)
 
static void FixDigraph (Parser &P, Preprocessor &PP, Token &DigraphToken, Token &ColonToken, tok::TokenKind Kind, bool AtDigraph)
 
static void tryConsumeLambdaSpecifierToken (Parser &P, SourceLocation &MutableLoc, SourceLocation &StaticLoc, SourceLocation &ConstexprLoc, SourceLocation &ConstevalLoc, SourceLocation &DeclEndLoc)
 
static void addStaticToLambdaDeclSpecifier (Parser &P, SourceLocation StaticLoc, DeclSpec &DS)
 
static void addConstexprToLambdaDeclSpecifier (Parser &P, SourceLocation ConstexprLoc, DeclSpec &DS)
 
static void addConstevalToLambdaDeclSpecifier (Parser &P, SourceLocation ConstevalLoc, DeclSpec &DS)
 
static void DiagnoseStaticSpecifierRestrictions (Parser &P, SourceLocation StaticLoc, SourceLocation MutableLoc, const LambdaIntroducer &Intro)
 
static TypeTrait TypeTraitFromTokKind (tok::TokenKind kind)
 
static ArrayTypeTrait ArrayTypeTraitFromTokKind (tok::TokenKind kind)
 
static ExpressionTrait ExpressionTraitFromTokKind (tok::TokenKind kind)
 

Macro Definition Documentation

◆ ARRAY_TYPE_TRAIT

#define ARRAY_TYPE_TRAIT (   Spelling,
  Name,
  Key 
)
Value:
case tok::kw_##Spelling: \
return ATT_##Name;

◆ EXPRESSION_TRAIT

#define EXPRESSION_TRAIT (   Spelling,
  Name,
  Key 
)
Value:
case tok::kw_##Spelling: \
return ET_##Name;

◆ GENERIC_IMAGE_TYPE

#define GENERIC_IMAGE_TYPE (   ImgType,
  Id 
)
Value:
case tok::kw_##ImgType##_t: \
DS.SetTypeSpecType(DeclSpec::TST_##ImgType##_t, Loc, PrevSpec, DiagID, \
Policy); \
break;

◆ OVERLOADED_OPERATOR

#define OVERLOADED_OPERATOR (   Name,
  Spelling,
  Token,
  Unary,
  Binary,
  MemberOnly 
)
Value:
case tok::Token: \
SymbolLocations[SymbolIdx++] = ConsumeToken(); \
Op = OO_##Name; \
break;

◆ OVERLOADED_OPERATOR_MULTI

#define OVERLOADED_OPERATOR_MULTI (   Name,
  Spelling,
  Unary,
  Binary,
  MemberOnly 
)

◆ TRANSFORM_TYPE_TRAIT_DEF

#define TRANSFORM_TYPE_TRAIT_DEF (   _,
  Trait 
)    case tok::kw___##Trait:

◆ TYPE_TRAIT_1

#define TYPE_TRAIT_1 (   Spelling,
  Name,
  Key 
)    case tok::kw_ ## Spelling: return UTT_ ## Name;

◆ TYPE_TRAIT_2

#define TYPE_TRAIT_2 (   Spelling,
  Name,
  Key 
)    case tok::kw_ ## Spelling: return BTT_ ## Name;

◆ TYPE_TRAIT_N

#define TYPE_TRAIT_N (   Spelling,
  Name,
  Key 
)     case tok::kw_ ## Spelling: return TT_ ## Name;

Function Documentation

◆ addConstevalToLambdaDeclSpecifier()

static void addConstevalToLambdaDeclSpecifier ( Parser P,
SourceLocation  ConstevalLoc,
DeclSpec DS 
)
static

◆ addConstexprToLambdaDeclSpecifier()

static void addConstexprToLambdaDeclSpecifier ( Parser P,
SourceLocation  ConstexprLoc,
DeclSpec DS 
)
static

◆ addStaticToLambdaDeclSpecifier()

static void addStaticToLambdaDeclSpecifier ( Parser P,
SourceLocation  StaticLoc,
DeclSpec DS 
)
static

◆ ArrayTypeTraitFromTokKind()

static ArrayTypeTrait ArrayTypeTraitFromTokKind ( tok::TokenKind  kind)
static

Definition at line 3866 of file ParseExprCXX.cpp.

◆ DiagnoseStaticSpecifierRestrictions()

static void DiagnoseStaticSpecifierRestrictions ( Parser P,
SourceLocation  StaticLoc,
SourceLocation  MutableLoc,
const LambdaIntroducer Intro 
)
static

◆ ExpressionTraitFromTokKind()

static ExpressionTrait ExpressionTraitFromTokKind ( tok::TokenKind  kind)
static

Definition at line 3877 of file ParseExprCXX.cpp.

◆ FixDigraph()

static void FixDigraph ( Parser P,
Preprocessor PP,
Token DigraphToken,
Token ColonToken,
tok::TokenKind  Kind,
bool  AtDigraph 
)
static

◆ SelectDigraphErrorMessage()

static int SelectDigraphErrorMessage ( tok::TokenKind  Kind)
static

Definition at line 32 of file ParseExprCXX.cpp.

Referenced by FixDigraph().

◆ tryConsumeLambdaSpecifierToken()

static void tryConsumeLambdaSpecifierToken ( Parser P,
SourceLocation MutableLoc,
SourceLocation StaticLoc,
SourceLocation ConstexprLoc,
SourceLocation ConstevalLoc,
SourceLocation DeclEndLoc 
)
static

◆ TypeTraitFromTokKind()

static TypeTrait TypeTraitFromTokKind ( tok::TokenKind  kind)
static

Definition at line 3852 of file ParseExprCXX.cpp.