SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- SourceLocation getLocStart() const LLVM_READONLY {
- return Range.getBegin();
- }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY {
- return Range.getEnd();
- }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceLocation getLocation() const LLVM_READONLY { return Loc; }
return SourceRange(LocStart, RBraceLoc);
}
- SourceLocation getLocStart() const LLVM_READONLY { return LocStart; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return LocStart; }
SourceLocation getRBraceLoc() const { return RBraceLoc; }
void setLocStart(SourceLocation L) { LocStart = L; }
void setRBraceLoc(SourceLocation L) { RBraceLoc = L; }
SourceRange getSourceRange() const override LLVM_READONLY;
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getOuterLocStart();
}
const Type *getTypeForDecl() const { return TypeForDecl; }
void setTypeForDecl(const Type *TD) { TypeForDecl = TD; }
- SourceLocation getLocStart() const LLVM_READONLY { return LocStart; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return LocStart; }
void setLocStart(SourceLocation L) { LocStart = L; }
SourceRange getSourceRange() const override LLVM_READONLY {
if (LocStart.isValid())
SourceLocation getRBraceLoc() const { return RBraceLoc; }
void setRBraceLoc(SourceLocation L) { RBraceLoc = L; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
if (RBraceLoc.isValid())
return RBraceLoc;
// No braces: get the end location of the (only) declaration in context
return SourceRange(getLocation(), getLocation());
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getSourceRange().getBegin();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getSourceRange().getEnd();
}
/// Retrieves the source range that contains the entire base specifier.
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
/// Get the location at which the base class type was written.
SourceLocation getBaseTypeLoc() const LLVM_READONLY {
HasBraces = RBraceLoc.isValid();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
if (hasBraces())
return getRBraceLoc();
// No braces: get the end location of the (only) declaration in context
SourceLocation getDeclaratorEndLoc() const { return DeclEndLoc; }
// Location information, modeled after the Stmt API.
- SourceLocation getLocStart() const LLVM_READONLY { return getLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return getLocation(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(getLocation(), getLocEnd());
}
SourceRange getSourceRange() const override LLVM_READONLY;
- SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
void setAtLoc(SourceLocation Loc) { AtLoc = Loc; }
ObjCPropertyDecl *getPropertyDecl() const {
/// getBeginLoc - Retrieve the location of the first token.
SourceLocation getBeginLoc() const { return NameLoc; }
- /// getEndLoc - Retrieve the location of the last token.
- SourceLocation getEndLoc() const { return getLocEnd(); }
-
/// getSourceRange - The range of the declaration name.
SourceRange getSourceRange() const LLVM_READONLY {
return SourceRange(getLocStart(), getLocEnd());
}
- SourceLocation getLocStart() const LLVM_READONLY {
- return getBeginLoc();
- }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
SourceLocation EndLoc = getEndLocPrivate();
return EndLoc.isValid() ? EndLoc : getLocStart();
}
+
private:
SourceLocation getEndLocPrivate() const;
};
/// Retrieve the location of this expression.
SourceLocation getLocation() const { return Loc; }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return SourceExpr ? SourceExpr->getLocStart() : Loc;
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return SourceExpr ? SourceExpr->getLocEnd() : Loc;
}
SourceLocation getExprLoc() const LLVM_READONLY {
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
- SourceLocation getLocStart() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
/// Determine whether this declaration reference was preceded by a
/// C++ nested-name-specifier, e.g., \c N::foo.
static StringRef getIdentTypeName(IdentType IT);
static std::string ComputeName(IdentType IT, const Decl *CurrentDecl);
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == PredefinedExprClass;
/// Returns a new empty integer literal.
static IntegerLiteral *Create(const ASTContext &C, EmptyShell Empty);
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
/// Retrieve the location of the literal.
SourceLocation getLocation() const { return Loc; }
QualType type, SourceLocation l,
unsigned Scale);
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
/// \brief Retrieve the location of the literal.
SourceLocation getLocation() const { return Loc; }
return static_cast<CharacterKind>(CharacterLiteralBits.Kind);
}
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
unsigned getValue() const { return Value; }
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == FloatingLiteralClass;
Expr *getSubExpr() { return cast<Expr>(Val); }
void setSubExpr(Expr *E) { Val = E; }
- SourceLocation getLocStart() const LLVM_READONLY { return Val->getLocStart(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Val->getLocEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
+ return Val->getLocStart();
+ }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Val->getLocEnd(); }
static bool classof(const Stmt *T) {
return T->getStmtClass() == ImaginaryLiteralClass;
tokloc_iterator tokloc_begin() const { return TokLocs; }
tokloc_iterator tokloc_end() const { return TokLocs + NumConcatenated; }
- SourceLocation getLocStart() const LLVM_READONLY { return TokLocs[0]; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return TokLocs[0]; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return TokLocs[NumConcatenated - 1];
}
Expr *getSubExpr() { return cast<Expr>(Val); }
void setSubExpr(Expr *E) { Val = E; }
- SourceLocation getLocStart() const LLVM_READONLY { return L; }
- SourceLocation getLocEnd() const LLVM_READONLY { return R; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return L; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return R; }
/// Get the location of the left parentheses '('.
SourceLocation getLParen() const { return L; }
/// the given unary opcode.
static OverloadedOperatorKind getOverloadedOperator(Opcode Opc);
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return isPostfix() ? Val->getLocStart() : Loc;
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return isPostfix() ? Loc : Val->getLocEnd();
}
SourceLocation getExprLoc() const LLVM_READONLY { return Loc; }
/// contains the location of the period (if there is one) and the
/// identifier.
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
};
/// OffsetOfExpr - [C99 7.17] - This represents an expression of the form
return NumExprs;
}
- SourceLocation getLocStart() const LLVM_READONLY { return OperatorLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return OperatorLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == OffsetOfExprClass;
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return OpLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return OpLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == UnaryExprOrTypeTraitExprClass;
return getRHS()->getType()->isIntegerType() ? getRHS() : getLHS();
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getLHS()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return RBracketLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RBracketLoc; }
SourceLocation getRBracketLoc() const { return RBracketLoc; }
void setRBracketLoc(SourceLocation L) { RBracketLoc = L; }
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
/// Return true if this is a call to __assume() or __builtin_assume() with
/// a non-value-dependent constant parameter evaluating as false.
SourceLocation getMemberLoc() const { return MemberLoc; }
void setMemberLoc(SourceLocation L) { MemberLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
SourceLocation getExprLoc() const LLVM_READONLY { return MemberLoc; }
TInfoAndScope.setPointer(tinfo);
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
// FIXME: Init should never be null.
if (!Init)
return SourceLocation();
return Init->getLocStart();
return LParenLoc;
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
// FIXME: Init should never be null.
if (!Init)
return SourceLocation();
static ImplicitCastExpr *CreateEmpty(const ASTContext &Context,
unsigned PathSize);
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getSubExpr()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getSubExpr()->getLocEnd();
}
SourceLocation getRParenLoc() const { return RPLoc; }
void setRParenLoc(SourceLocation L) { RPLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return LPLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return LPLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getSubExpr()->getLocEnd();
}
Expr *getRHS() const { return cast<Expr>(SubExprs[RHS]); }
void setRHS(Expr *E) { SubExprs[RHS] = E; }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getLHS()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getRHS()->getLocEnd();
}
Expr *getLHS() const { return cast<Expr>(SubExprs[LHS]); }
Expr *getRHS() const { return cast<Expr>(SubExprs[RHS]); }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getCond()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getRHS()->getLocEnd();
}
return cast<Expr>(SubExprs[RHS]);
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getCommon()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getFalseExpr()->getLocEnd();
}
SourceLocation getLabelLoc() const { return LabelLoc; }
void setLabelLoc(SourceLocation L) { LabelLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return AmpAmpLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return LabelLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AmpAmpLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return LabelLoc; }
LabelDecl *getLabel() const { return Label; }
void setLabel(LabelDecl *L) { Label = L; }
const CompoundStmt *getSubStmt() const { return cast<CompoundStmt>(SubStmt); }
void setSubStmt(CompoundStmt *S) { SubStmt = S; }
- SourceLocation getLocStart() const LLVM_READONLY { return LParenLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
SourceLocation getLParenLoc() const { return LParenLoc; }
void setLParenLoc(SourceLocation L) { LParenLoc = L; }
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == ShuffleVectorExprClass;
/// getRParenLoc - Return the location of final right parenthesis.
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == ConvertVectorExprClass;
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == ChooseExprClass;
SourceLocation getTokenLocation() const { return TokenLoc; }
void setTokenLocation(SourceLocation L) { TokenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return TokenLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return TokenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return TokenLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return TokenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == GNUNullExprClass;
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == VAArgExprClass;
InitListExprBits.HadArrayRangeDesignator = ARD;
}
- SourceLocation getLocStart() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
return T->getStmtClass() == InitListExprClass;
return ArrayOrRange.Index;
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
if (Kind == FieldDesignator)
return getDotLoc().isInvalid()? getFieldLoc() : getDotLoc();
else
return getLBracketLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return Kind == FieldDesignator ? getFieldLoc() : getRBracketLoc();
}
SourceRange getSourceRange() const LLVM_READONLY {
SourceRange getDesignatorsSourceRange() const;
- SourceLocation getLocStart() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
return T->getStmtClass() == DesignatedInitExprClass;
return T->getStmtClass() == NoInitExprClass;
}
- SourceLocation getLocStart() const LLVM_READONLY { return SourceLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
// Iterators
child_range children() {
explicit DesignatedInitUpdateExpr(EmptyShell Empty)
: Expr(DesignatedInitUpdateExprClass, Empty) { }
- SourceLocation getLocStart() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
return T->getStmtClass() == DesignatedInitUpdateExprClass;
return S->getStmtClass() == ArrayInitLoopExprClass;
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getCommonExpr()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getCommonExpr()->getLocEnd();
}
return S->getStmtClass() == ArrayInitIndexExprClass;
}
- SourceLocation getLocStart() const LLVM_READONLY { return SourceLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
child_range children() {
return child_range(child_iterator(), child_iterator());
return T->getStmtClass() == ImplicitValueInitExprClass;
}
- SourceLocation getLocStart() const LLVM_READONLY { return SourceLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
// Iterators
child_range children() {
SourceLocation getLParenLoc() const { return LParenLoc; }
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return LParenLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == ParenListExprClass;
const Expr *getResultExpr() const { return getAssocExpr(getResultIndex()); }
Expr *getResultExpr() { return getAssocExpr(getResultIndex()); }
- SourceLocation getLocStart() const LLVM_READONLY { return GenericLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return GenericLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == GenericSelectionExprClass;
/// aggregate Constant of ConstantInt(s).
void getEncodedElementAccess(SmallVectorImpl<uint32_t> &Elts) const;
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getBase()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return AccessorLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return AccessorLoc; }
/// isArrow - Return true if the base expression is a pointer to vector,
/// return false if the base expression is a vector.
const Stmt *getBody() const;
Stmt *getBody();
- SourceLocation getLocStart() const LLVM_READONLY { return getCaretLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getBody()->getLocEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
+ return getCaretLocation();
+ }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
+ return getBody()->getLocEnd();
+ }
/// getFunctionType - Return the underlying function type for this block.
const FunctionProtoType *getFunctionType() const;
/// getRParenLoc - Return the location of final right parenthesis.
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == AsTypeExprClass;
return getSyntacticForm()->getExprLoc();
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getSyntacticForm()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getSyntacticForm()->getLocEnd();
}
SourceLocation getBuiltinLoc() const { return BuiltinLoc; }
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == AtomicExprClass;
return const_child_range(const_child_iterator(), const_child_iterator());
}
- SourceLocation getLocStart() const LLVM_READONLY { return SourceLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
static bool classof(const Stmt *T) {
return T->getStmtClass() == TypoExprClass;
: getOperatorLoc();
}
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const { return Range; }
static bool classof(const Stmt *T) {
/// Retrieve the location of the closing parenthesis.
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
SourceRange getAngleBrackets() const LLVM_READONLY { return AngleBrackets; }
static bool classof(const Stmt *T) {
return const_cast<UserDefinedLiteral*>(this)->getCookedLiteral();
}
- SourceLocation getLocStart() const {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const {
if (getLiteralOperatorKind() == LOK_Template)
return getRParenLoc();
return getArg(0)->getLocStart();
}
- SourceLocation getLocEnd() const { return getRParenLoc(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const { return getRParenLoc(); }
/// Returns the location of a ud-suffix in the expression.
///
bool getValue() const { return Value; }
void setValue(bool V) { Value = V; }
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
explicit CXXNullPtrLiteralExpr(EmptyShell Empty)
: Expr(CXXNullPtrLiteralExprClass, Empty) {}
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
Expr *getSubExpr() { return static_cast<Expr*>(SubExpr); }
const Expr *getSubExpr() const { return static_cast<const Expr*>(SubExpr); }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return SubExpr->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return SubExpr->getLocEnd();
}
Operand = E;
}
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
void setSourceRange(SourceRange R) { Range = R; }
return getBaseExpr() && getBaseExpr()->isImplicitCXXThis();
}
- SourceLocation getLocStart() const {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const {
if (!isImplicitAccess())
return BaseExpr->getLocStart();
else if (QualifierLoc)
return MemberLoc;
}
- SourceLocation getLocEnd() const { return getMemberLoc(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const { return getMemberLoc(); }
child_range children() {
return child_range((Stmt**)&BaseExpr, (Stmt**)&BaseExpr + 1);
Expr *getIdx() { return cast<Expr>(SubExprs[IDX_EXPR]); }
const Expr *getIdx() const { return cast<Expr>(SubExprs[IDX_EXPR]); }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getBase()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return RBracketLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RBracketLoc; }
SourceLocation getRBracketLoc() const { return RBracketLoc; }
void setRBracketLoc(SourceLocation L) { RBracketLoc = L; }
void setUuidStr(StringRef US) { UuidStr = US; }
StringRef getUuidStr() const { return UuidStr; }
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
void setSourceRange(SourceRange R) { Range = R; }
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
bool isImplicit() const { return Implicit; }
void setImplicit(bool I) { Implicit = I; }
/// this variable.
bool isThrownVariableInScope() const { return IsThrownVariableInScope; }
- SourceLocation getLocStart() const LLVM_READONLY { return ThrowLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return ThrowLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
if (!getSubExpr())
return ThrowLoc;
return getSubExpr()->getLocEnd();
/// Default argument expressions have no representation in the
/// source, so they have an empty source range.
- SourceLocation getLocStart() const LLVM_READONLY { return SourceLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
SourceLocation getExprLoc() const LLVM_READONLY { return Loc; }
return Field->getInClassInitializer();
}
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXDefaultInitExprClass;
Expr *getSubExpr() { return cast<Expr>(SubExpr); }
void setSubExpr(Expr *E) { SubExpr = E; }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return SubExpr->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return SubExpr->getLocEnd();}
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
+ return SubExpr->getLocEnd();
+ }
// Implement isa/cast/dyncast/etc.
static bool classof(const Stmt *T) {
Args[Arg] = ArgExpr;
}
- SourceLocation getLocStart() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
SourceRange getParenOrBraceRange() const { return ParenOrBraceRange; }
void setParenOrBraceRange(SourceRange Range) { ParenOrBraceRange = Range; }
bool inheritedFromVBase() const { return InheritedFromVirtualBase; }
SourceLocation getLocation() const LLVM_READONLY { return Loc; }
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXInheritedCtorInitExprClass;
/// Determine whether this expression models list-initialization.
bool isListInitialization() const { return LParenLoc.isInvalid(); }
- SourceLocation getLocStart() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXFunctionalCastExprClass;
TypeSourceInfo *getTypeSourceInfo() const { return Type; }
- SourceLocation getLocStart() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXTemporaryObjectExprClass;
return T->getStmtClass() == LambdaExprClass;
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return IntroducerRange.getBegin();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return ClosingBrace; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return ClosingBrace; }
child_range children() {
// Includes initialization exprs plus body stmt
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXScalarValueInitExprClass;
return SubExprs + Array + hasInitializer() + getNumPlacementArgs();
}
- SourceLocation getStartLoc() const { return Range.getBegin(); }
+ SourceLocation getStartLoc() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const { return Range.getBegin(); }
SourceLocation getEndLoc() const { return Range.getEnd(); }
SourceRange getDirectInitRange() const { return DirectInitRange; }
return Range;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getStartLoc(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
static bool classof(const Stmt *T) {
/// be a pointer, return an invalid type.
QualType getDestroyedType() const;
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY {return Argument->getLocEnd();}
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
+ return Argument->getLocEnd();
+ }
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXDeleteExprClass;
DestroyedType = PseudoDestructorTypeStorage(Info);
}
- SourceLocation getLocStart() const LLVM_READONLY {return Base->getLocStart();}
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
+ return Base->getLocStart();
+ }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXPseudoDestructorExprClass;
getNumArgs());
}
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == TypeTraitExprClass;
virtual ~ArrayTypeTraitExpr() = default;
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParen; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParen; }
ArrayTypeTrait getTrait() const { return static_cast<ArrayTypeTrait>(ATT); }
explicit ExpressionTraitExpr(EmptyShell Empty)
: Expr(ExpressionTraitExprClass, Empty), ET(0), Value(false) {}
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParen; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParen; }
ExpressionTrait getTrait() const { return static_cast<ExpressionTrait>(ET); }
/// that was looked in to find these results.
CXXRecordDecl *getNamingClass() const { return NamingClass; }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
if (NestedNameSpecifierLoc l = getQualifierLoc())
return l.getBeginLoc();
return getNameInfo().getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
if (hasExplicitTemplateArgs())
return getRAngleLoc();
return getNameInfo().getLocEnd();
/// Note: getLocStart() is the start of the whole DependentScopeDeclRefExpr,
/// and differs from getLocation().getStart().
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return QualifierLoc.getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
if (hasExplicitTemplateArgs())
return getRAngleLoc();
return getLocation();
/// when modifying an existing AST to preserve its invariants.
void setSubExpr(Expr *E) { SubExpr = E; }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return SubExpr->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return SubExpr->getLocEnd();}
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
+ return SubExpr->getLocEnd();
+ }
// Implement isa/cast/dyncast/etc.
static bool classof(const Stmt *T) {
*(arg_begin() + I) = E;
}
- SourceLocation getLocStart() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
if (!RParenLoc.isValid() && NumArgs > 0)
return getArg(NumArgs - 1)->getLocEnd();
return RParenLoc;
return {getTemplateArgs(), getNumTemplateArgs()};
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
if (!isImplicitAccess())
return Base->getLocStart();
if (getQualifier())
return MemberNameInfo.getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
if (hasExplicitTemplateArgs())
return getRAngleLoc();
return MemberNameInfo.getEndLoc();
// diagnosing a problem with this expression.
SourceLocation getExprLoc() const LLVM_READONLY { return getMemberLoc(); }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
if (!isImplicitAccess())
return Base->getLocStart();
if (NestedNameSpecifierLoc l = getQualifierLoc())
return getMemberNameInfo().getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
if (hasExplicitTemplateArgs())
return getRAngleLoc();
return getMemberNameInfo().getLocEnd();
Expr *getOperand() const { return static_cast<Expr*>(Operand); }
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
bool getValue() const { return Value; }
return None;
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return Pattern->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return EllipsisLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return EllipsisLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == PackExpansionExprClass;
return llvm::makeArrayRef(Args, Args + Length);
}
- SourceLocation getLocStart() const LLVM_READONLY { return OperatorLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return OperatorLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == SizeOfPackExprClass;
Param(param), Replacement(replacement), NameLoc(loc) {}
SourceLocation getNameLoc() const { return NameLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return NameLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return NameLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return NameLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return NameLoc; }
Expr *getReplacement() const { return cast<Expr>(Replacement); }
/// template arguments.
TemplateArgument getArgumentPack() const;
- SourceLocation getLocStart() const LLVM_READONLY { return NameLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return NameLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return NameLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return NameLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == SubstNonTypeTemplateParmPackExprClass;
/// Get an expansion of the parameter pack by index.
ParmVarDecl *getExpansion(unsigned I) const { return begin()[I]; }
- SourceLocation getLocStart() const LLVM_READONLY { return NameLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return NameLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return NameLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return NameLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == FunctionParmPackExprClass;
return getValueKind() == VK_LValue;
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getTemporary()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getTemporary()->getLocEnd();
}
SourceLocation getEllipsisLoc() const { return EllipsisLoc; }
BinaryOperatorKind getOperator() const { return Opcode; }
- SourceLocation getLocStart() const LLVM_READONLY {
- return LParenLoc;
- }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
- return RParenLoc;
- }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXFoldExprClass;
return static_cast<Expr*>(SubExprs[SubExpr::Resume]);
}
- SourceLocation getLocStart() const LLVM_READONLY {
- return KeywordLoc;
- }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getCommonExpr()->getLocEnd();
}
SourceLocation getKeywordLoc() const { return KeywordLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return KeywordLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getOperand()->getLocEnd();
}
SourceLocation getAtLoc() const { return AtLoc; }
void setAtLoc(SourceLocation L) { AtLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return String->getLocEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return String->getLocEnd(); }
// Iterators
child_range children() { return child_range(&String, &String+1); }
bool getValue() const { return Value; }
void setValue(bool V) { Value = V; }
- SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
SourceLocation getAtLoc() const { return Range.getBegin(); }
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY {
return Range;
static ObjCArrayLiteral *CreateEmpty(const ASTContext &C,
unsigned NumElements);
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
/// Retrieve elements of array of literals.
return DictWithObjectsMethod;
}
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
// Iterators
EncodedType = EncType;
}
- SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
// Iterators
child_range children() {
void setAtLoc(SourceLocation L) { AtLoc = L; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
/// getNumArgs - Return the number of actual arguments to this call.
unsigned getNumArgs() const { return SelName.getNumArgs(); }
void setAtLoc(SourceLocation L) { AtLoc = L; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
// Iterators
child_range children() {
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return isFreeIvar() ? Loc : getBase()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
SourceLocation getOpLoc() const { return OpLoc; }
void setOpLoc(SourceLocation L) { OpLoc = L; }
/// Determine the type of the base, regardless of the kind of receiver.
QualType getReceiverType(const ASTContext &ctx) const;
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return isObjectReceiver() ? getBase()->getLocStart() :getReceiverLocation();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return IdLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return IdLoc; }
// Iterators
child_range children() {
SourceLocation getRBracket() const { return RBracket; }
void setRBracket(SourceLocation RB) { RBracket = RB; }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return SubExprs[BASE]->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return RBracket; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RBracket; }
Expr *getBaseExpr() const { return cast<Expr>(SubExprs[BASE]); }
void setBaseExpr(Stmt *S) { SubExprs[BASE] = S; }
RBracLoc = R.getEnd();
}
- SourceLocation getLocStart() const LLVM_READONLY { return LBracLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RBracLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return LBracLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RBracLoc; }
// Iterators
child_range children();
SourceLocation getOpLoc() const { return OpLoc; }
void setOpLoc(SourceLocation L) { OpLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getBase()->getLocStart();
}
return getBase()->getLocEnd();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return IsaMemberLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return IsaMemberLoc; }
SourceLocation getExprLoc() const LLVM_READONLY { return IsaMemberLoc; }
child_range children() { return child_range(&Operand, &Operand+1); }
// Source locations are determined by the subexpression.
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return Operand->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return Operand->getLocEnd();}
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
+ return Operand->getLocEnd();
+ }
SourceLocation getExprLoc() const LLVM_READONLY {
return getSubExpr()->getExprLoc();
/// The location of the bridge keyword.
SourceLocation getBridgeKeywordLoc() const { return BridgeKeywordLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return LParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getSubExpr()->getLocEnd();
}
explicit ObjCAvailabilityCheckExpr(EmptyShell Shell)
: Expr(ObjCAvailabilityCheckExprClass, Shell) {}
- SourceLocation getLocStart() const { return AtLoc; }
- SourceLocation getLocEnd() const { return RParen; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const { return AtLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const { return RParen; }
SourceRange getSourceRange() const { return {AtLoc, RParen}; }
/// This may be '*', in which case this should fold to true.
/// Set length of the array section.
void setLength(Expr *E) { SubExprs[LENGTH] = E; }
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getBase()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return RBracketLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RBracketLoc; }
SourceLocation getColonLoc() const { return ColonLoc; }
void setColonLoc(SourceLocation L) { ColonLoc = L; }
public:
/// Returns the starting location of the clause.
- SourceLocation getLocStart() const { return StartLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const { return StartLoc; }
/// Returns the ending location of the clause.
- SourceLocation getLocEnd() const { return EndLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const { return EndLoc; }
/// Sets the starting location of the clause.
void setLocStart(SourceLocation Loc) { StartLoc = Loc; }
}
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
const char *getBriefText(const ASTContext &Context) const {
if (BriefTextValid)
/// value objects created/interpreted by SourceManager. We assume AST
/// clients will have a pointer to the respective SourceManager.
SourceRange getSourceRange() const LLVM_READONLY;
- SourceLocation getLocStart() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY;
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
// global temp stats (until we have a per-module visitor)
static void addStmtClass(const StmtClass s);
DeclGroupRef getDeclGroup() { return DG; }
void setDeclGroup(DeclGroupRef DGR) { DG = DGR; }
- SourceLocation getStartLoc() const { return StartLoc; }
+ SourceLocation getStartLoc() const LLVM_READONLY { return getBeginLoc(); }
void setStartLoc(SourceLocation L) { StartLoc = L; }
SourceLocation getEndLoc() const { return EndLoc; }
void setEndLoc(SourceLocation L) { EndLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return StartLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return StartLoc; }
SourceLocation getLocEnd() const LLVM_READONLY { return EndLoc; }
static bool classof(const Stmt *T) {
bool hasLeadingEmptyMacro() const { return HasLeadingEmptyMacro; }
- SourceLocation getLocStart() const LLVM_READONLY { return SemiLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return SemiLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return SemiLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return SemiLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == NullStmtClass;
return const_reverse_body_iterator(body_begin());
}
- SourceLocation getLocStart() const LLVM_READONLY { return LBraceLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RBraceLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return LBraceLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RBraceLoc; }
SourceLocation getLBracLoc() const { return LBraceLoc; }
SourceLocation getRBracLoc() const { return RBraceLoc; }
return const_cast<SwitchCase*>(this)->getSubStmt();
}
- SourceLocation getLocStart() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
return T->getStmtClass() == CaseStmtClass ||
void setLHS(Expr *Val) { SubExprs[LHS] = reinterpret_cast<Stmt*>(Val); }
void setRHS(Expr *Val) { SubExprs[RHS] = reinterpret_cast<Stmt*>(Val); }
- SourceLocation getLocStart() const LLVM_READONLY { return KeywordLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
// Handle deeply nested case statements with iteration instead of recursion.
const CaseStmt *CS = this;
while (const auto *CS2 = dyn_cast<CaseStmt>(CS->getSubStmt()))
SourceLocation getColonLoc() const { return ColonLoc; }
void setColonLoc(SourceLocation L) { ColonLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return SubStmt->getLocEnd();}
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
+ return SubStmt->getLocEnd();
+ }
static bool classof(const Stmt *T) {
return T->getStmtClass() == DefaultStmtClass;
child_range children() { return child_range(&SubStmt, &SubStmt+1); }
};
-inline SourceLocation SwitchCase::getLocEnd() const {
+inline SourceLocation SwitchCase::getEndLoc() const {
if (const auto *CS = dyn_cast<CaseStmt>(this))
return CS->getLocEnd();
return cast<DefaultStmt>(this)->getLocEnd();
void setIdentLoc(SourceLocation L) { IdentLoc = L; }
void setSubStmt(Stmt *SS) { SubStmt = SS; }
- SourceLocation getLocStart() const LLVM_READONLY { return IdentLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return SubStmt->getLocEnd();}
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return IdentLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
+ return SubStmt->getLocEnd();
+ }
child_range children() { return child_range(&SubStmt, &SubStmt+1); }
Stmt *getSubStmt() { return SubStmt; }
const Stmt *getSubStmt() const { return SubStmt; }
- SourceLocation getLocStart() const LLVM_READONLY { return AttrLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return SubStmt->getLocEnd();}
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AttrLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
+ return SubStmt->getLocEnd();
+ }
child_range children() { return child_range(&SubStmt, &SubStmt + 1); }
bool isObjCAvailabilityCheck() const;
- SourceLocation getLocStart() const LLVM_READONLY { return IfLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return IfLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
if (SubExprs[ELSE])
return SubExprs[ELSE]->getLocEnd();
else
/// have been explicitly covered.
bool isAllEnumCasesCovered() const { return FirstCase.getInt(); }
- SourceLocation getLocStart() const LLVM_READONLY { return SwitchLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return SwitchLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return SubExprs[BODY] ? SubExprs[BODY]->getLocEnd() : SubExprs[COND]->getLocEnd();
}
SourceLocation getWhileLoc() const { return WhileLoc; }
void setWhileLoc(SourceLocation L) { WhileLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return WhileLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return WhileLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return SubExprs[BODY]->getLocEnd();
}
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return DoLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return DoLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == DoStmtClass;
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return ForLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return ForLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return SubExprs[BODY]->getLocEnd();
}
SourceLocation getLabelLoc() const { return LabelLoc; }
void setLabelLoc(SourceLocation L) { LabelLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return GotoLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return LabelLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return GotoLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return LabelLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == GotoStmtClass;
return const_cast<IndirectGotoStmt*>(this)->getConstantTarget();
}
- SourceLocation getLocStart() const LLVM_READONLY { return GotoLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Target->getLocEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return GotoLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Target->getLocEnd(); }
static bool classof(const Stmt *T) {
return T->getStmtClass() == IndirectGotoStmtClass;
SourceLocation getContinueLoc() const { return ContinueLoc; }
void setContinueLoc(SourceLocation L) { ContinueLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return ContinueLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return ContinueLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return ContinueLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return ContinueLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == ContinueStmtClass;
SourceLocation getBreakLoc() const { return BreakLoc; }
void setBreakLoc(SourceLocation L) { BreakLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return BreakLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return BreakLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return BreakLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return BreakLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == BreakStmtClass;
const VarDecl *getNRVOCandidate() const { return NRVOCandidate; }
void setNRVOCandidate(const VarDecl *Var) { NRVOCandidate = Var; }
- SourceLocation getLocStart() const LLVM_READONLY { return RetLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return RetLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return RetExpr ? RetExpr->getLocEnd() : RetLoc;
}
bool isVolatile() const { return IsVolatile; }
void setVolatile(bool V) { IsVolatile = V; }
- SourceLocation getLocStart() const LLVM_READONLY { return {}; }
- SourceLocation getLocEnd() const LLVM_READONLY { return {}; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return {}; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return {}; }
//===--- Asm String Analysis ---===//
return Clobbers[i];
}
- SourceLocation getLocStart() const LLVM_READONLY { return AsmLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AsmLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == GCCAsmStmtClass;
ArrayRef<Expr*> Exprs, ArrayRef<StringRef> Clobbers);
public:
- SourceLocation getLocStart() const LLVM_READONLY { return AsmLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return EndLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AsmLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
static bool classof(const Stmt *T) {
return T->getStmtClass() == MSAsmStmtClass;
Expr *FilterExpr,
Stmt *Block);
- SourceLocation getLocStart() const LLVM_READONLY { return getExceptLoc(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return getExceptLoc(); }
SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
SourceLocation getExceptLoc() const { return Loc; }
SourceLocation FinallyLoc,
Stmt *Block);
- SourceLocation getLocStart() const LLVM_READONLY { return getFinallyLoc(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return getFinallyLoc(); }
SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
SourceLocation getFinallyLoc() const { return Loc; }
SourceLocation TryLoc, Stmt *TryBlock,
Stmt *Handler);
- SourceLocation getLocStart() const LLVM_READONLY { return getTryLoc(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return getTryLoc(); }
SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
SourceLocation getTryLoc() const { return TryLoc; }
SourceLocation getLeaveLoc() const { return LeaveLoc; }
void setLeaveLoc(SourceLocation L) { LeaveLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return LeaveLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return LeaveLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return LeaveLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return LeaveLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == SEHLeaveStmtClass;
return capture_init_begin() + NumCaptures;
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getCapturedStmt()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getCapturedStmt()->getLocEnd();
}
CXXCatchStmt(EmptyShell Empty)
: Stmt(CXXCatchStmtClass), ExceptionDecl(nullptr), HandlerBlock(nullptr) {}
- SourceLocation getLocStart() const LLVM_READONLY { return CatchLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return CatchLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return HandlerBlock->getLocEnd();
}
static CXXTryStmt *Create(const ASTContext &C, EmptyShell Empty,
unsigned numHandlers);
- SourceLocation getLocStart() const LLVM_READONLY { return getTryLoc(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return getTryLoc(); }
SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
SourceLocation getTryLoc() const { return TryLoc; }
SourceLocation getColonLoc() const { return ColonLoc; }
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return ForLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return ForLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return SubExprs[BODY]->getLocEnd();
}
return reinterpret_cast<CompoundStmt *>(SubStmt);
}
- SourceLocation getLocStart() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return SubStmt->getLocEnd();}
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
+ return SubStmt->getLocEnd();
+ }
child_range children() {
return child_range(&SubStmt, &SubStmt+1);
return {getStoredStmts() + SubStmt::FirstParamMove, NumParams};
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return getBody() ? getBody()->getLocStart()
: getPromiseDecl()->getLocStart();
}
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getBody() ? getBody()->getLocEnd() : getPromiseDecl()->getLocEnd();
}
bool isImplicit() const { return IsImplicit; }
void setIsImplicit(bool value = true) { IsImplicit = value; }
- SourceLocation getLocStart() const LLVM_READONLY { return CoreturnLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return CoreturnLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getOperand() ? getOperand()->getLocEnd() : getLocStart();
}
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation Loc) { RParenLoc = Loc; }
- SourceLocation getLocStart() const LLVM_READONLY { return ForLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return ForLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return SubExprs[BODY]->getLocEnd();
}
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation Loc) { RParenLoc = Loc; }
- SourceLocation getLocStart() const LLVM_READONLY { return AtCatchLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return Body->getLocEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AtCatchLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Body->getLocEnd(); }
bool hasEllipsis() const { return getCatchParamDecl() == nullptr; }
Stmt *getFinallyBody() { return AtFinallyStmt; }
void setFinallyBody(Stmt *S) { AtFinallyStmt = S; }
- SourceLocation getLocStart() const LLVM_READONLY { return AtFinallyLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AtFinallyLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return AtFinallyStmt->getLocEnd();
}
getStmts()[1 + NumCatchStmts] = S;
}
- SourceLocation getLocStart() const LLVM_READONLY { return AtTryLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY;
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AtTryLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
return T->getStmtClass() == ObjCAtTryStmtClass;
}
void setSynchExpr(Stmt *S) { SubStmts[SYNC_EXPR] = S; }
- SourceLocation getLocStart() const LLVM_READONLY { return AtSynchronizedLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AtSynchronizedLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return getSynchBody()->getLocEnd();
}
SourceLocation getThrowLoc() const LLVM_READONLY { return AtThrowLoc; }
void setThrowLoc(SourceLocation Loc) { AtThrowLoc = Loc; }
- SourceLocation getLocStart() const LLVM_READONLY { return AtThrowLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AtThrowLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
return Throw ? Throw->getLocEnd() : AtThrowLoc;
}
Stmt *getSubStmt() { return SubStmt; }
void setSubStmt(Stmt *S) { SubStmt = S; }
- SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return SubStmt->getLocEnd();}
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY {
+ return SubStmt->getLocEnd();
+ }
SourceLocation getAtLoc() const { return AtLoc; }
void setAtLoc(SourceLocation Loc) { AtLoc = Loc; }
}
/// Returns starting location of directive kind.
- SourceLocation getLocStart() const { return StartLoc; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const { return StartLoc; }
/// Returns ending location of directive.
- SourceLocation getLocEnd() const { return EndLoc; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const { return EndLoc; }
/// Set starting location of directive kind.
///
/// Returns the start sourcelocation of the first statement in this sequence.
///
/// This method should only be called on a non-empty StmtSequence object.
- SourceLocation getStartLoc() const;
+ SourceLocation getStartLoc() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const;
/// Returns the end sourcelocation of the last statement in this sequence.
///
const CXXScopeSpec &getTypeSpecScope() const { return TypeScope; }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceLocation getTypeSpecWidthLoc() const { return TSWRange.getBegin(); }
SourceRange getTypeSpecWidthRange() const { return TSWRange; }
SourceRange getSourceRange() const LLVM_READONLY {
return SourceRange(StartLocation, EndLocation);
}
- SourceLocation getLocStart() const LLVM_READONLY { return StartLocation; }
- SourceLocation getLocEnd() const LLVM_READONLY { return EndLocation; }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return StartLocation; }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return EndLocation; }
};
/// A set of tokens that has been cached for later parsing.
/// Get the source range that spans this declarator.
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
void SetSourceRange(SourceRange R) { Range = R; }
/// SetRangeBegin - Set the start of the source range to Loc, unless it's
return this;
}
-SourceLocation ObjCMethodDecl::getLocEnd() const {
+SourceLocation ObjCMethodDecl::getEndLoc() const {
if (Stmt *Body = getBody())
return Body->getLocEnd();
return DeclEndLoc;
return new (Mem) DeclRefExpr(EmptyShell());
}
-SourceLocation DeclRefExpr::getLocStart() const {
+SourceLocation DeclRefExpr::getBeginLoc() const {
if (hasQualifier())
return getQualifierLoc().getBeginLoc();
return getNameInfo().getLocStart();
}
-SourceLocation DeclRefExpr::getLocEnd() const {
+SourceLocation DeclRefExpr::getEndLoc() const {
if (hasExplicitTemplateArgs())
return getRAngleLoc();
return getNameInfo().getLocEnd();
return FnType->getReturnType();
}
-SourceLocation CallExpr::getLocStart() const {
+SourceLocation CallExpr::getBeginLoc() const {
if (isa<CXXOperatorCallExpr>(this))
return cast<CXXOperatorCallExpr>(this)->getLocStart();
begin = getArg(0)->getLocStart();
return begin;
}
-SourceLocation CallExpr::getLocEnd() const {
+SourceLocation CallExpr::getEndLoc() const {
if (isa<CXXOperatorCallExpr>(this))
return cast<CXXOperatorCallExpr>(this)->getLocEnd();
return E;
}
-SourceLocation MemberExpr::getLocStart() const {
+SourceLocation MemberExpr::getBeginLoc() const {
if (isImplicitAccess()) {
if (hasQualifier())
return getQualifierLoc().getBeginLoc();
return BaseStartLoc;
return MemberLoc;
}
-SourceLocation MemberExpr::getLocEnd() const {
+SourceLocation MemberExpr::getEndLoc() const {
SourceLocation EndLoc = getMemberNameInfo().getEndLoc();
if (hasExplicitTemplateArgs())
EndLoc = getRAngleLoc();
return Lit && Lit->getValue() == 0;
}
-SourceLocation InitListExpr::getLocStart() const {
+SourceLocation InitListExpr::getBeginLoc() const {
if (InitListExpr *SyntacticForm = getSyntacticForm())
return SyntacticForm->getLocStart();
SourceLocation Beg = LBraceLoc;
return Beg;
}
-SourceLocation InitListExpr::getLocEnd() const {
+SourceLocation InitListExpr::getEndLoc() const {
if (InitListExpr *SyntacticForm = getSyntacticForm())
return SyntacticForm->getLocEnd();
SourceLocation End = RBraceLoc;
DIE->getDesignator(size()-1)->getLocEnd());
}
-SourceLocation DesignatedInitExpr::getLocStart() const {
+SourceLocation DesignatedInitExpr::getBeginLoc() const {
SourceLocation StartLoc;
auto *DIE = const_cast<DesignatedInitExpr *>(this);
Designator &First = *DIE->getDesignator(0);
return StartLoc;
}
-SourceLocation DesignatedInitExpr::getLocEnd() const {
+SourceLocation DesignatedInitExpr::getEndLoc() const {
return getInit()->getLocEnd();
}
BaseAndUpdaterExprs[1] = ILE;
}
-SourceLocation DesignatedInitUpdateExpr::getLocStart() const {
+SourceLocation DesignatedInitUpdateExpr::getBeginLoc() const {
return getBase()->getLocStart();
}
-SourceLocation DesignatedInitUpdateExpr::getLocEnd() const {
+SourceLocation DesignatedInitUpdateExpr::getEndLoc() const {
return getBase()->getLocEnd();
}
}
// CXXScalarValueInitExpr
-SourceLocation CXXScalarValueInitExpr::getLocStart() const {
+SourceLocation CXXScalarValueInitExpr::getBeginLoc() const {
return TypeInfo ? TypeInfo->getTypeLoc().getBeginLoc() : RParenLoc;
}
return QualType();
}
-SourceLocation CXXPseudoDestructorExpr::getLocEnd() const {
+SourceLocation CXXPseudoDestructorExpr::getEndLoc() const {
SourceLocation End = DestroyedType.getLocation();
if (TypeSourceInfo *TInfo = DestroyedType.getTypeSourceInfo())
End = TInfo->getTypeLoc().getLocalSourceRange().getEnd();
return E;
}
-SourceLocation CXXConstructExpr::getLocStart() const {
+SourceLocation CXXConstructExpr::getBeginLoc() const {
if (isa<CXXTemporaryObjectExpr>(this))
return cast<CXXTemporaryObjectExpr>(this)->getLocStart();
return Loc;
}
-SourceLocation CXXConstructExpr::getLocEnd() const {
+SourceLocation CXXConstructExpr::getEndLoc() const {
if (isa<CXXTemporaryObjectExpr>(this))
return cast<CXXTemporaryObjectExpr>(this)->getLocEnd();
return new (Buffer) CXXFunctionalCastExpr(EmptyShell(), PathSize);
}
-SourceLocation CXXFunctionalCastExpr::getLocStart() const {
+SourceLocation CXXFunctionalCastExpr::getBeginLoc() const {
return getTypeInfoAsWritten()->getTypeLoc().getLocStart();
}
-SourceLocation CXXFunctionalCastExpr::getLocEnd() const {
+SourceLocation CXXFunctionalCastExpr::getEndLoc() const {
return RParenLoc.isValid() ? RParenLoc : getSubExpr()->getLocEnd();
}
CXXConstructExpr::CK_Complete, ParenOrBraceRange),
Type(TSI) {}
-SourceLocation CXXTemporaryObjectExpr::getLocStart() const {
+SourceLocation CXXTemporaryObjectExpr::getBeginLoc() const {
return Type->getTypeLoc().getBeginLoc();
}
-SourceLocation CXXTemporaryObjectExpr::getLocEnd() const {
+SourceLocation CXXTemporaryObjectExpr::getEndLoc() const {
SourceLocation Loc = getParenOrBraceRange().getEnd();
if (Loc.isInvalid() && getNumArgs())
Loc = getArg(getNumArgs()-1)->getLocEnd();
return new (Mem) CXXUnresolvedConstructExpr(Empty, NumArgs);
}
-SourceLocation CXXUnresolvedConstructExpr::getLocStart() const {
+SourceLocation CXXUnresolvedConstructExpr::getBeginLoc() const {
return Type->getTypeLoc().getBeginLoc();
}
llvm_unreachable("unknown statement kind!");
}
-SourceLocation Stmt::getLocStart() const {
-// llvm::errs() << "getLocStart() for " << getStmtClassName() << "\n";
+SourceLocation Stmt::getBeginLoc() const {
+ // llvm::errs() << "getBeginLoc() for " << getStmtClassName() << "\n";
switch (getStmtClass()) {
case Stmt::NoStmtClass: llvm_unreachable("statement without class");
#define ABSTRACT_STMT(type)
llvm_unreachable("unknown statement kind");
}
-SourceLocation Stmt::getLocEnd() const {
+SourceLocation Stmt::getEndLoc() const {
switch (getStmtClass()) {
case Stmt::NoStmtClass: llvm_unreachable("statement without class");
#define ABSTRACT_STMT(type)
return new (Mem) ObjCAtTryStmt(EmptyShell(), NumCatchStmts, HasFinally);
}
-SourceLocation ObjCAtTryStmt::getLocEnd() const {
+SourceLocation ObjCAtTryStmt::getEndLoc() const {
if (HasFinally)
return getFinallyStmt()->getLocEnd();
if (NumCatchStmts)
return D->getASTContext();
}
-SourceLocation StmtSequence::getStartLoc() const {
+SourceLocation StmtSequence::getBeginLoc() const {
return front()->getLocStart();
}
void setStartLoc(SourceLocation Loc) { LocStart = Loc; }
- SourceLocation getStartLoc() const {
+ SourceLocation getStartLoc() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const {
assert(LocStart && "Region has no start location");
return *LocStart;
}
StartToken, StartTokenByteOffset);
}
- SourceLocation getLocStart() const LLVM_READONLY {
+ SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ SourceLocation getBeginLoc() const LLVM_READONLY {
return FExpr->getLocStart().getLocWithOffset(Offset);
}
- SourceLocation getLocEnd() const LLVM_READONLY { return FExpr->getLocEnd(); }
+ SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ SourceLocation getEndLoc() const LLVM_READONLY { return FExpr->getLocEnd(); }
};
} // namespace