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;
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]); }
105 return getBase()->getLocStart();
120 return T->getStmtClass() == OMPArraySectionExprClass;
124 return child_range(&SubExprs[BASE], &SubExprs[END_EXPR]);
SourceLocation getExprLoc() const LLVM_READONLY
A (possibly-)qualified type.
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
Expr * getLowerBound()
Get lower bound of array section.
The base class of the type hierarchy.
void setLength(Expr *E)
Set length of the array section.
void setBase(Expr *E)
Set base of the array section.
OMPArraySectionExpr(Expr *Base, Expr *LowerBound, Expr *Length, QualType Type, ExprValueKind VK, ExprObjectKind OK, SourceLocation ColonLoc, SourceLocation RBracketLoc)
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
OpenMP 4.0 [2.4, Array Sections].
const Expr * getBase() const
OMPArraySectionExpr(EmptyShell Shell)
Create an empty array section expression.
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
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)
void setColonLoc(SourceLocation L)
const Expr * getLength() const
SourceLocation getLocStart() const LLVM_READONLY
Encodes a location in the source.
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
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 getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
detail::InMemoryDirectory::const_iterator E
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.
SourceLocation getRBracketLoc() const
SourceLocation getColonLoc() const
const Expr * getLowerBound() const
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].