14 #ifndef LLVM_CLANG_AST_EXPROPENMP_H 15 #define LLVM_CLANG_AST_EXPROPENMP_H 46 enum { BASE, LOWER_BOUND, LENGTH, END_EXPR };
47 Stmt *SubExprs[END_EXPR];
56 OMPArraySectionExprClass, Type, VK, OK,
69 ColonLoc(ColonLoc), RBracketLoc(RBracketLoc) {
70 SubExprs[BASE] = Base;
71 SubExprs[LOWER_BOUND] = LowerBound;
72 SubExprs[LENGTH] = Length;
77 :
Expr(OMPArraySectionExprClass, Shell) {}
83 const Expr *
getBase()
const {
return cast<Expr>(SubExprs[BASE]); }
93 return cast_or_null<Expr>(SubExprs[LOWER_BOUND]);
100 const Expr *
getLength()
const {
return cast_or_null<Expr>(SubExprs[LENGTH]); }
126 return child_range(&SubExprs[BASE], &SubExprs[END_EXPR]);
SourceLocation getExprLoc() const LLVM_READONLY
A (possibly-)qualified type.
Stmt - This represents one statement.
const Expr * getLength() const
Expr * getLowerBound()
Get lower bound of array section.
The base class of the type hierarchy.
llvm::iterator_range< child_iterator > child_range
void setLength(Expr *E)
Set length of the array section.
void setBase(Expr *E)
Set base of the array section.
SourceLocation getEndLoc() const LLVM_READONLY
OMPArraySectionExpr(Expr *Base, Expr *LowerBound, Expr *Length, QualType Type, ExprValueKind VK, ExprObjectKind OK, SourceLocation ColonLoc, SourceLocation RBracketLoc)
bool isTypeDependent() const
isTypeDependent - Determines whether this expression is type-dependent (C++ [temp.dep.expr]), which means that its type could change from one template instantiation to the next.
SourceLocation getBeginLoc() const LLVM_READONLY
OpenMP 4.0 [2.4, Array Sections].
OMPArraySectionExpr(EmptyShell Shell)
Create an empty array section expression.
SourceLocation getLocEnd() const LLVM_READONLY
Expr - This represents one expression.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
void setRBracketLoc(SourceLocation L)
SourceLocation getRBracketLoc() const
void setColonLoc(SourceLocation L)
const Expr * getBase() const
SourceLocation getLocStart() const LLVM_READONLY
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
Encodes a location in the source.
const Expr * getLowerBound() const
SourceLocation getLocStart() const LLVM_READONLY
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
SourceLocation getColonLoc() const
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
Dataflow Directional Tag Classes.
StmtClass getStmtClass() const
void setLowerBound(Expr *E)
Set lower bound of the array section.
static QualType getBaseOriginalType(const Expr *Base)
Return original type of the base expression for array section.
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
static bool classof(const Stmt *T)
Expr * getLength()
Get length of array section.
Expr * getBase()
An array section can be written only as Base[LowerBound:Length].