clang  11.0.0git
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/OpenMPClause.h"
#include "clang/AST/StmtOpenMP.h"
#include "clang/Basic/OpenMPKinds.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/TokenKinds.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 "llvm/Frontend/OpenMP/OMPContext.h"
Include dependency graph for ParseOpenMP.cpp:

Go to the source code of this file.

Enumerations

enum  OpenMPDirectiveKindEx
 
enum  OMPContextLvl
 Constant used in the diagnostics to distinguish the levels in an OpenMP contexts: selector-set={selector(trait, ...), ...}, .... More...
 

Functions

static unsigned getOpenMPDirectiveKindEx (StringRef S)
 
static OpenMPDirectiveKindExWrapper 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 checkExtensionProperty (Parser &P, SourceLocation Loc, OMPTraitProperty &TIProperty, OMPTraitSelector &TISelector, llvm::StringMap< SourceLocation > &Seen)
 
static ExprResult parseContextScore (Parser &P)
 Parse optional 'score' '(' <expr> ')' ':'. 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

◆ OMPContextLvl

Constant used in the diagnostics to distinguish the levels in an OpenMP contexts: selector-set={selector(trait, ...), ...}, ....

Definition at line 811 of file ParseOpenMP.cpp.

◆ OpenMPDirectiveKindEx

Definition at line 35 of file ParseOpenMP.cpp.

Function Documentation

◆ checkExtensionProperty()

static bool checkExtensionProperty ( Parser P,
SourceLocation  Loc,
OMPTraitProperty TIProperty,
OMPTraitSelector TISelector,
llvm::StringMap< SourceLocation > &  Seen 
)
static

◆ getOpenMPDirectiveKindEx()

static unsigned getOpenMPDirectiveKindEx ( StringRef  S)
static

Definition at line 91 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

◆ parseMapType()

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

◆ parseOpenMPDirectiveKind()

static OpenMPDirectiveKindExWrapper 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