clang  14.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/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/ParsedTemplate.h"
#include "clang/Sema/Scope.h"
#include "llvm/Support/ErrorHandling.h"
#include <numeric>
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/OperatorKinds.def"
#include "clang/Basic/TokenKinds.def"
Include dependency graph for ParseExprCXX.cpp:

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 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)
 
#define TYPE_TRAIT(N, Spelling, K)   case tok::kw_##Spelling: return N;
 

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 &ConstexprLoc, SourceLocation &ConstevalLoc, SourceLocation &DeclEndLoc)
 
static void addConstexprToLambdaDeclSpecifier (Parser &P, SourceLocation ConstexprLoc, DeclSpec &DS)
 
static void addConstevalToLambdaDeclSpecifier (Parser &P, SourceLocation ConstevalLoc, DeclSpec &DS)
 
static TypeTrait TypeTraitFromTokKind (tok::TokenKind kind)
 
static ArrayTypeTrait ArrayTypeTraitFromTokKind (tok::TokenKind kind)
 
static ExpressionTrait ExpressionTraitFromTokKind (tok::TokenKind kind)
 
static unsigned TypeTraitArity (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 
)

◆ TYPE_TRAIT

#define TYPE_TRAIT (   N,
  Spelling,
 
)    case tok::kw_##Spelling: return N;

◆ 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

◆ ArrayTypeTraitFromTokKind()

static ArrayTypeTrait ArrayTypeTraitFromTokKind ( tok::TokenKind  kind)
static

Definition at line 3662 of file ParseExprCXX.cpp.

◆ ExpressionTraitFromTokKind()

static ExpressionTrait ExpressionTraitFromTokKind ( tok::TokenKind  kind)
static

Definition at line 3673 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 29 of file ParseExprCXX.cpp.

Referenced by FixDigraph().

◆ tryConsumeLambdaSpecifierToken()

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

◆ TypeTraitArity()

static unsigned TypeTraitArity ( tok::TokenKind  kind)
static

Definition at line 3684 of file ParseExprCXX.cpp.

◆ TypeTraitFromTokKind()

static TypeTrait TypeTraitFromTokKind ( tok::TokenKind  kind)
static

Definition at line 3648 of file ParseExprCXX.cpp.