#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/TemplateKinds.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 "clang/Sema/SemaCodeCompletion.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include <numeric>
#include "clang/Basic/TransformTypeTraits.def"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/HLSLIntangibleTypes.def"
#include "clang/Basic/OperatorKinds.def"
#include "clang/Basic/TokenKinds.def"
Go to the source code of this file.
|
#define | TRANSFORM_TYPE_TRAIT_DEF(_, Trait) case tok::kw___##Trait: |
|
#define | GENERIC_IMAGE_TYPE(ImgType, Id) |
|
#define | HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) |
|
#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) |
|
|
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) |
|
◆ 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;
◆ HLSL_INTANGIBLE_TYPE
#define HLSL_INTANGIBLE_TYPE |
( |
|
Name, |
|
|
|
Id, |
|
|
|
SingletonId |
|
) |
| |
Value: case tok::kw_##Name: \
DS.SetTypeSpecType(DeclSpec::TST_##Name,
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 [1/2]
#define TRANSFORM_TYPE_TRAIT_DEF |
( |
|
_, |
|
|
|
Trait |
|
) |
| case tok::kw___##Trait: |
◆ TRANSFORM_TYPE_TRAIT_DEF [2/2]
#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; |
◆ addConstevalToLambdaDeclSpecifier()
◆ addConstexprToLambdaDeclSpecifier()
◆ addStaticToLambdaDeclSpecifier()
◆ ArrayTypeTraitFromTokKind()
◆ DiagnoseStaticSpecifierRestrictions()
◆ ExpressionTraitFromTokKind()
◆ FixDigraph()
Definition at line 58 of file ParseExprCXX.cpp.
References clang::FixItHint::CreateReplacement(), clang::Preprocessor::EnterToken(), clang::Token::getLocation(), clang::SourceLocation::getLocWithOffset(), clang::Preprocessor::Lex(), P, Range, SelectDigraphErrorMessage(), clang::SourceRange::setBegin(), clang::SourceRange::setEnd(), clang::Token::setKind(), clang::Token::setLength(), and clang::Token::setLocation().
◆ SelectDigraphErrorMessage()
◆ tryConsumeLambdaSpecifierToken()
◆ TypeTraitFromTokKind()