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 dependency graph for ParseOpenMP.cpp:

Go to the source code of this file.


enum  OpenMPDirectiveKindEx


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 bool parseDeclareVariantClause (Parser &P)
 Parses clauses for 'declare variant' directive. 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 28 of file ParseOpenMP.cpp.

Function Documentation

◆ getOpenMPDirectiveKindEx()

static unsigned getOpenMPDirectiveKindEx ( StringRef  S)

Definition at line 68 of file ParseOpenMP.cpp.

Referenced by parseOpenMPDirectiveKind().

◆ isMapModifier()

static OpenMPMapModifierKind isMapModifier ( Parser P)

◆ isMapType()

static OpenMPMapClauseKind isMapType ( Parser P)

◆ 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 

◆ parseDeclareVariantClause()

static bool parseDeclareVariantClause ( Parser P)

◆ parseMapType()

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

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 2356 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)

◆ parseOpenMPReductionId()

static DeclarationName parseOpenMPReductionId ( Parser P)

◆ parseOpenMPSimpleClause()

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

◆ ParseReductionId()

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