clang  10.0.0svn
Enumerations | Functions
ParseOpenMP.cpp File Reference

This file implements parsing of all OpenMP directives and clauses. More...

#include "clang/AST/ASTContext.h"
#include "clang/AST/StmtOpenMP.h"
#include "clang/Parse/ParseDiagnostic.h"
#include "clang/Parse/Parser.h"
#include "clang/Parse/RAIIObjectsForParser.h"
#include "clang/Sema/Scope.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/UniqueVector.h"
Include dependency graph for ParseOpenMP.cpp:

Go to the source code of this file.

Enumerations

enum  OpenMPDirectiveKindEx
 

Functions

static unsigned getOpenMPDirectiveKindEx (StringRef S)
 
static OpenMPDirectiveKind parseOpenMPDirectiveKind (Parser &P)
 
static DeclarationName parseOpenMPReductionId (Parser &P)
 
static bool parseDeclareSimdClauses (Parser &P, OMPDeclareSimdDeclAttr::BranchStateTy &BS, ExprResult &SimdLen, SmallVectorImpl< Expr *> &Uniforms, SmallVectorImpl< Expr *> &Aligneds, SmallVectorImpl< Expr *> &Alignments, SmallVectorImpl< Expr *> &Linears, SmallVectorImpl< unsigned > &LinModifiers, SmallVectorImpl< Expr *> &Steps)
 Parses clauses for 'declare simd' directive. More...
 
static ExprResult parseContextScore (Parser &P)
 Parse optional 'score' '(' <expr> ')' ':'. More...
 
static void parseImplementationSelector (Parser &P, SourceLocation Loc, llvm::StringMap< SourceLocation > &UsedCtx, llvm::function_ref< void(SourceRange, const Sema::OpenMPDeclareVariantCtsSelectorData &)> Callback)
 Parse context selector for 'implementation' selector set: 'vendor' '(' [ 'score' '(' <score _expr>=""> ')' ':' ] <vendor> { ',' <vendor> } ')'. More...
 
static Optional< SimpleClauseData > parseOpenMPSimpleClause (Parser &P, OpenMPClauseKind Kind)
 
static bool ParseReductionId (Parser &P, CXXScopeSpec &ReductionIdScopeSpec, UnqualifiedId &ReductionId)
 
static OpenMPMapModifierKind isMapModifier (Parser &P)
 Checks if the token is a valid map-type-modifier. More...
 
static OpenMPMapClauseKind isMapType (Parser &P)
 Checks if the token is a valid map-type. More...
 
static void parseMapType (Parser &P, Parser::OpenMPVarListDataTy &Data)
 Parse map-type in map clause. More...
 

Detailed Description

This file implements parsing of all OpenMP directives and clauses.

Definition in file ParseOpenMP.cpp.

Enumeration Type Documentation

◆ OpenMPDirectiveKindEx

Definition at line 29 of file ParseOpenMP.cpp.

Function Documentation

◆ getOpenMPDirectiveKindEx()

static unsigned getOpenMPDirectiveKindEx ( StringRef  S)
static

Definition at line 70 of file ParseOpenMP.cpp.

Referenced by parseOpenMPDirectiveKind().

◆ isMapModifier()

static OpenMPMapModifierKind isMapModifier ( Parser P)
static

◆ isMapType()

static OpenMPMapClauseKind isMapType ( Parser P)
static

◆ parseContextScore()

static ExprResult parseContextScore ( Parser P)
static

◆ parseDeclareSimdClauses()

static bool parseDeclareSimdClauses ( Parser P,
OMPDeclareSimdDeclAttr::BranchStateTy &  BS,
ExprResult SimdLen,
SmallVectorImpl< Expr *> &  Uniforms,
SmallVectorImpl< Expr *> &  Aligneds,
SmallVectorImpl< Expr *> &  Alignments,
SmallVectorImpl< Expr *> &  Linears,
SmallVectorImpl< unsigned > &  LinModifiers,
SmallVectorImpl< Expr *> &  Steps 
)
static

◆ parseImplementationSelector()

static void parseImplementationSelector ( Parser P,
SourceLocation  Loc,
llvm::StringMap< SourceLocation > &  UsedCtx,
llvm::function_ref< void(SourceRange, const Sema::OpenMPDeclareVariantCtsSelectorData &)>  Callback 
)
static

Parse context selector for 'implementation' selector set: 'vendor' '(' [ 'score' '(' <score _expr>=""> ')' ':' ] <vendor> { ',' <vendor> } ')'.

Definition at line 822 of file ParseOpenMP.cpp.

◆ parseMapType()

static void parseMapType ( Parser P,
Parser::OpenMPVarListDataTy Data 
)
static

Parse map-type in map clause.

map([ [map-type-modifier[,] [map-type-modifier[,] ...] map-type : ] list) where, map-type ::= to | from | tofrom | alloc | release | delete

Definition at line 2535 of file ParseOpenMP.cpp.

References clang::Parser::ConsumeToken(), clang::Parser::Diag(), clang::Parser::getCurToken(), clang::Token::is(), isMapType(), clang::Parser::OpenMPVarListDataTy::MapType, clang::OMPC_MAP_unknown, and clang::format::Tok.

Referenced by clang::Parser::ParseOpenMPVarList().

◆ parseOpenMPDirectiveKind()

static OpenMPDirectiveKind parseOpenMPDirectiveKind ( Parser P)
static

◆ parseOpenMPReductionId()

static DeclarationName parseOpenMPReductionId ( Parser P)
static

◆ parseOpenMPSimpleClause()

static Optional<SimpleClauseData> parseOpenMPSimpleClause ( Parser P,
OpenMPClauseKind  Kind 
)
static

◆ ParseReductionId()

static bool ParseReductionId ( Parser P,
CXXScopeSpec ReductionIdScopeSpec,
UnqualifiedId ReductionId 
)
static