clang
8.0.0
|
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"
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 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 void | parseMapTypeModifiers (Parser &P, Parser::OpenMPVarListDataTy &Data) |
Parse map-type-modifiers in map clause. 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... | |
This file implements parsing of all OpenMP directives and clauses.
Definition in file ParseOpenMP.cpp.
Definition at line 29 of file ParseOpenMP.cpp.
|
static |
Definition at line 65 of file ParseOpenMP.cpp.
Referenced by parseOpenMPDirectiveKind().
|
static |
Checks if the token is a valid map-type-modifier.
Definition at line 1778 of file ParseOpenMP.cpp.
References clang::Parser::getCurToken(), clang::getOpenMPSimpleClauseType(), clang::Parser::getPreprocessor(), clang::Preprocessor::getSpelling(), clang::Token::is(), clang::OMPC_MAP_MODIFIER_unknown, and clang::format::Tok.
Referenced by parseMapTypeModifiers().
|
static |
Checks if the token is a valid map-type.
Definition at line 1824 of file ParseOpenMP.cpp.
References clang::Parser::getCurToken(), clang::getOpenMPSimpleClauseType(), clang::Parser::getPreprocessor(), clang::Preprocessor::getSpelling(), clang::Token::isOneOf(), clang::OMPC_MAP_unknown, and clang::format::Tok.
Referenced by parseMapType().
|
static |
Parses clauses for 'declare simd' directive.
clause: 'inbranch' | 'notinbranch' 'simdlen' '(' <expr> ')' { 'uniform' '(' <argument_list> ')' } { 'aligned '(' <argument_list> [ ':' <alignment> ] ')' } { 'linear '(' <argument_list> [ ':' <step> ] ')' }
Definition at line 537 of file ParseOpenMP.cpp.
References clang::Sema::CheckOpenMPLinearModifier(), clang::Parser::ConsumeToken(), clang::Parser::OpenMPVarListDataTy::DepLinMapLoc, Diag(), clang::Parser::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Parser::getActions(), clang::Parser::getCurToken(), clang::Token::getEndLoc(), clang::Token::getIdentifierInfo(), clang::Token::getLocation(), clang::IdentifierInfo::getName(), clang::getOpenMPClauseKind(), clang::getOpenMPDirectiveName(), clang::Token::is(), clang::format::FormatToken::is(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Token::isNot(), clang::format::FormatToken::isNot(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Parser::OpenMPVarListDataTy::LinKind, clang::OMPC_uniform, clang::Parser::ParseOpenMPParensExpr(), clang::Parser::ParseOpenMPVarList(), clang::Parser::OpenMPVarListDataTy::TailExpr, and clang::format::Tok.
|
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 1838 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().
|
static |
Parse map-type-modifiers in map clause.
map([ [map-type-modifier[,] [map-type-modifier[,] ...] map-type : ] list) where, map-type-modifier ::= always | close
Definition at line 1792 of file ParseOpenMP.cpp.
References clang::Parser::ConsumeToken(), clang::Parser::Diag(), clang::Parser::getCurToken(), clang::Token::getLocation(), clang::Parser::getPreprocessor(), clang::Token::is(), isMapModifier(), clang::Token::isNot(), clang::Preprocessor::LookAhead(), clang::Parser::OpenMPVarListDataTy::MapTypeModifiers, clang::Parser::OpenMPVarListDataTy::MapTypeModifiersLoc, and clang::format::Tok.
Referenced by clang::Parser::ParseOpenMPVarList().
|
static |
Definition at line 83 of file ParseOpenMP.cpp.
References clang::Parser::ConsumeToken(), clang::Parser::getCurToken(), getOpenMPDirectiveKindEx(), clang::Parser::getPreprocessor(), clang::Preprocessor::getSpelling(), clang::Token::isAnnotation(), clang::Preprocessor::LookAhead(), clang::OMPD_unknown, and clang::format::Tok.
Referenced by clang::Parser::ParseOpenMPParensExpr().
|
static |
Definition at line 161 of file ParseOpenMP.cpp.
References clang::Parser::ConsumeToken(), clang::ASTContext::DeclarationNames, clang::Parser::Diag(), clang::BalancedDelimiterTracker::expectAndConsume(), clang::Parser::getActions(), clang::Sema::getASTContext(), clang::Parser::getCurToken(), clang::Token::getIdentifierInfo(), clang::Token::getKind(), clang::Token::getLocation(), clang::getOpenMPDirectiveName(), clang::Token::is(), clang::OO_None, clang::Parser::SkipUntil(), clang::Parser::StopBeforeMatch, and clang::format::Tok.
|
static |
Definition at line 1731 of file ParseOpenMP.cpp.
References clang::Parser::ConsumeToken(), clang::Parser::getCurToken(), clang::Token::getKind(), clang::CXXScopeSpec::isEmpty(), clang::OO_None, clang::Parser::ParseUnqualifiedId(), and clang::UnqualifiedId::setOperatorFunctionId().
Referenced by clang::Parser::ParseOpenMPVarList().