r339403 - Mark up deprecated methods as such
Stephen Kelly via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 9 15:45:38 PDT 2018
Author: steveire
Date: Thu Aug 9 15:45:38 2018
New Revision: 339403
URL: http://llvm.org/viewvc/llvm-project?rev=339403&view=rev
Log:
Mark up deprecated methods as such
Reviewers: teemperor!
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50352
Modified:
cfe/trunk/include/clang/AST/Comment.h
cfe/trunk/include/clang/AST/Decl.h
cfe/trunk/include/clang/AST/DeclBase.h
cfe/trunk/include/clang/AST/DeclCXX.h
cfe/trunk/include/clang/AST/DeclObjC.h
cfe/trunk/include/clang/AST/DeclarationName.h
cfe/trunk/include/clang/AST/Expr.h
cfe/trunk/include/clang/AST/ExprCXX.h
cfe/trunk/include/clang/AST/ExprObjC.h
cfe/trunk/include/clang/AST/ExprOpenMP.h
cfe/trunk/include/clang/AST/OpenMPClause.h
cfe/trunk/include/clang/AST/RawCommentList.h
cfe/trunk/include/clang/AST/Stmt.h
cfe/trunk/include/clang/AST/StmtCXX.h
cfe/trunk/include/clang/AST/StmtObjC.h
cfe/trunk/include/clang/AST/StmtOpenMP.h
cfe/trunk/include/clang/AST/TypeLoc.h
cfe/trunk/include/clang/Analysis/CloneDetection.h
cfe/trunk/include/clang/Sema/DeclSpec.h
cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp
cfe/trunk/lib/Sema/SemaChecking.cpp
Modified: cfe/trunk/include/clang/AST/Comment.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Comment.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Comment.h (original)
+++ cfe/trunk/include/clang/AST/Comment.h Thu Aug 9 15:45:38 2018
@@ -215,10 +215,16 @@ public:
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceLocation getLocation() const LLVM_READONLY { return Loc; }
Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Thu Aug 9 15:45:38 2018
@@ -614,7 +614,10 @@ public:
return SourceRange(LocStart, RBraceLoc);
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return LocStart; }
SourceLocation getRBraceLoc() const { return RBraceLoc; }
void setLocStart(SourceLocation L) { LocStart = L; }
@@ -736,7 +739,10 @@ public:
SourceRange getSourceRange() const override LLVM_READONLY;
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getOuterLocStart();
}
@@ -2867,7 +2873,10 @@ public:
const Type *getTypeForDecl() const { return TypeForDecl; }
void setTypeForDecl(const Type *TD) { TypeForDecl = TD; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return LocStart; }
void setLocStart(SourceLocation L) { LocStart = L; }
SourceRange getSourceRange() const override LLVM_READONLY {
@@ -4195,7 +4204,10 @@ public:
SourceLocation getRBraceLoc() const { return RBraceLoc; }
void setRBraceLoc(SourceLocation L) { RBraceLoc = L; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
if (RBraceLoc.isValid())
return RBraceLoc;
Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Thu Aug 9 15:45:38 2018
@@ -406,12 +406,18 @@ public:
return SourceRange(getLocation(), getLocation());
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getSourceRange().getBegin();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getSourceRange().getEnd();
}
Modified: cfe/trunk/include/clang/AST/DeclCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Thu Aug 9 15:45:38 2018
@@ -233,9 +233,15 @@ public:
/// Retrieves the source range that contains the entire base specifier.
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
/// Get the location at which the base class type was written.
@@ -2872,7 +2878,10 @@ public:
LinkageSpecDeclBits.HasBraces = RBraceLoc.isValid();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
if (hasBraces())
return getRBraceLoc();
Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Thu Aug 9 15:45:38 2018
@@ -280,9 +280,15 @@ public:
SourceLocation getDeclaratorEndLoc() const { return DeclEndLoc; }
// Location information, modeled after the Stmt API.
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return getLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(getLocation(), getEndLoc());
@@ -2803,7 +2809,10 @@ public:
SourceRange getSourceRange() const override LLVM_READONLY;
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
void setAtLoc(SourceLocation Loc) { AtLoc = Loc; }
Modified: cfe/trunk/include/clang/AST/DeclarationName.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclarationName.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclarationName.h (original)
+++ cfe/trunk/include/clang/AST/DeclarationName.h Thu Aug 9 15:45:38 2018
@@ -642,9 +642,15 @@ public:
return SourceRange(getBeginLoc(), getEndLoc());
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
SourceLocation EndLoc = getEndLocPrivate();
return EndLoc.isValid() ? EndLoc : getBeginLoc();
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Thu Aug 9 15:45:38 2018
@@ -904,11 +904,17 @@ public:
/// Retrieve the location of this expression.
SourceLocation getLocation() const { return Loc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return SourceExpr ? SourceExpr->getBeginLoc() : Loc;
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SourceExpr ? SourceExpr->getEndLoc() : Loc;
}
@@ -1066,9 +1072,15 @@ public:
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
/// Determine whether this declaration reference was preceded by a
@@ -1246,9 +1258,15 @@ public:
static StringRef getIdentTypeName(IdentType IT);
static std::string ComputeName(IdentType IT, const Decl *CurrentDecl);
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
static bool classof(const Stmt *T) {
@@ -1337,9 +1355,15 @@ public:
/// Returns a new empty integer literal.
static IntegerLiteral *Create(const ASTContext &C, EmptyShell Empty);
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
/// Retrieve the location of the literal.
@@ -1378,9 +1402,15 @@ class FixedPointLiteral : public Expr, p
QualType type, SourceLocation l,
unsigned Scale);
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
/// \brief Retrieve the location of the literal.
@@ -1434,9 +1464,15 @@ public:
return static_cast<CharacterKind>(CharacterLiteralBits.Kind);
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
unsigned getValue() const { return Value; }
@@ -1509,9 +1545,15 @@ public:
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
static bool classof(const Stmt *T) {
@@ -1548,11 +1590,17 @@ public:
Expr *getSubExpr() { return cast<Expr>(Val); }
void setSubExpr(Expr *E) { Val = E; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return Val->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Val->getEndLoc(); }
static bool classof(const Stmt *T) {
@@ -1726,9 +1774,15 @@ public:
tokloc_iterator tokloc_begin() const { return TokLocs; }
tokloc_iterator tokloc_end() const { return TokLocs + NumConcatenated; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return TokLocs[0]; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return TokLocs[NumConcatenated - 1];
}
@@ -1768,9 +1822,15 @@ public:
Expr *getSubExpr() { return cast<Expr>(Val); }
void setSubExpr(Expr *E) { Val = E; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return L; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return R; }
/// Get the location of the left parentheses '('.
@@ -1894,11 +1954,17 @@ public:
/// the given unary opcode.
static OverloadedOperatorKind getOverloadedOperator(Opcode Opc);
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return isPostfix() ? Val->getBeginLoc() : Loc;
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return isPostfix() ? Loc : Val->getEndLoc();
}
@@ -2004,9 +2070,15 @@ public:
/// 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 getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
};
@@ -2106,9 +2178,15 @@ public:
return NumExprs;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return OperatorLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -2204,9 +2282,15 @@ public:
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return OpLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -2280,11 +2364,17 @@ public:
return getRHS()->getType()->isIntegerType() ? getRHS() : getLHS();
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getLHS()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RBracketLoc; }
SourceLocation getRBracketLoc() const { return RBracketLoc; }
@@ -2452,9 +2542,15 @@ public:
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
/// Return true if this is a call to __assume() or __builtin_assume() with
@@ -2700,9 +2796,15 @@ public:
SourceLocation getMemberLoc() const { return MemberLoc; }
void setMemberLoc(SourceLocation L) { MemberLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
SourceLocation getExprLoc() const LLVM_READONLY { return MemberLoc; }
@@ -2792,7 +2894,10 @@ public:
TInfoAndScope.setPointer(tinfo);
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
// FIXME: Init should never be null.
if (!Init)
@@ -2801,7 +2906,10 @@ public:
return Init->getBeginLoc();
return LParenLoc;
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
// FIXME: Init should never be null.
if (!Init)
@@ -2996,11 +3104,17 @@ public:
static ImplicitCastExpr *CreateEmpty(const ASTContext &Context,
unsigned PathSize);
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getSubExpr()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getSubExpr()->getEndLoc();
}
@@ -3107,9 +3221,15 @@ public:
SourceLocation getRParenLoc() const { return RPLoc; }
void setRParenLoc(SourceLocation L) { RPLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return LPLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getSubExpr()->getEndLoc();
}
@@ -3189,11 +3309,17 @@ public:
Expr *getRHS() const { return cast<Expr>(SubExprs[RHS]); }
void setRHS(Expr *E) { SubExprs[RHS] = E; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getLHS()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getRHS()->getEndLoc();
}
@@ -3474,11 +3600,17 @@ public:
Expr *getLHS() const { return cast<Expr>(SubExprs[LHS]); }
Expr *getRHS() const { return cast<Expr>(SubExprs[RHS]); }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getCond()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getRHS()->getEndLoc();
}
@@ -3564,11 +3696,17 @@ public:
return cast<Expr>(SubExprs[RHS]);
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getCommon()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getFalseExpr()->getEndLoc();
}
@@ -3624,9 +3762,15 @@ public:
SourceLocation getLabelLoc() const { return LabelLoc; }
void setLabelLoc(SourceLocation L) { LabelLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AmpAmpLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return LabelLoc; }
LabelDecl *getLabel() const { return Label; }
@@ -3671,9 +3815,15 @@ public:
const CompoundStmt *getSubStmt() const { return cast<CompoundStmt>(SubStmt); }
void setSubStmt(CompoundStmt *S) { SubStmt = S; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
SourceLocation getLParenLoc() const { return LParenLoc; }
@@ -3722,9 +3872,15 @@ public:
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -3808,9 +3964,15 @@ public:
/// getRParenLoc - Return the location of final right parenthesis.
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -3891,9 +4053,15 @@ public:
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -3932,9 +4100,15 @@ public:
SourceLocation getTokenLocation() const { return TokenLoc; }
void setTokenLocation(SourceLocation L) { TokenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return TokenLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return TokenLoc; }
static bool classof(const Stmt *T) {
@@ -3986,9 +4160,15 @@ public:
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -4222,9 +4402,15 @@ public:
InitListExprBits.HadArrayRangeDesignator = ARD;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
@@ -4459,14 +4645,20 @@ public:
return ArrayOrRange.Index;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
if (Kind == FieldDesignator)
return getDotLoc().isInvalid()? getFieldLoc() : getDotLoc();
else
return getLBracketLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return Kind == FieldDesignator ? getFieldLoc() : getRBracketLoc();
}
@@ -4550,9 +4742,15 @@ public:
SourceRange getDesignatorsSourceRange() const;
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
@@ -4594,9 +4792,15 @@ public:
return T->getStmtClass() == NoInitExprClass;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
// Iterators
@@ -4631,9 +4835,15 @@ public:
explicit DesignatedInitUpdateExpr(EmptyShell Empty)
: Expr(DesignatedInitUpdateExprClass, Empty) { }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
@@ -4708,11 +4918,17 @@ public:
return S->getStmtClass() == ArrayInitLoopExprClass;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getCommonExpr()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getCommonExpr()->getEndLoc();
}
@@ -4745,9 +4961,15 @@ public:
return S->getStmtClass() == ArrayInitIndexExprClass;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
child_range children() {
@@ -4783,9 +5005,15 @@ public:
return T->getStmtClass() == ImplicitValueInitExprClass;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
// Iterators
@@ -4830,9 +5058,15 @@ public:
SourceLocation getLParenLoc() const { return LParenLoc; }
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -4956,9 +5190,15 @@ public:
const Expr *getResultExpr() const { return getAssocExpr(getResultIndex()); }
Expr *getResultExpr() { return getAssocExpr(getResultIndex()); }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return GenericLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -5024,11 +5264,17 @@ public:
/// aggregate Constant of ConstantInt(s).
void getEncodedElementAccess(SmallVectorImpl<uint32_t> &Elts) const;
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getBase()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return AccessorLoc; }
/// isArrow - Return true if the base expression is a pointer to vector,
@@ -5071,11 +5317,17 @@ public:
const Stmt *getBody() const;
Stmt *getBody();
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getCaretLocation();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getBody()->getEndLoc();
}
@@ -5130,9 +5382,15 @@ public:
/// getRParenLoc - Return the location of final right parenthesis.
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -5274,11 +5532,17 @@ public:
return getSyntacticForm()->getExprLoc();
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getSyntacticForm()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getSyntacticForm()->getEndLoc();
}
@@ -5403,9 +5667,15 @@ public:
SourceLocation getBuiltinLoc() const { return BuiltinLoc; }
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -5459,9 +5729,15 @@ public:
return const_child_range(const_child_iterator(), const_child_iterator());
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
static bool classof(const Stmt *T) {
Modified: cfe/trunk/include/clang/AST/ExprCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprCXX.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprCXX.h (original)
+++ cfe/trunk/include/clang/AST/ExprCXX.h Thu Aug 9 15:45:38 2018
@@ -132,9 +132,15 @@ public:
: getOperatorLoc();
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const { return Range; }
@@ -280,9 +286,15 @@ public:
/// Retrieve the location of the closing parenthesis.
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
SourceRange getAngleBrackets() const LLVM_READONLY { return AngleBrackets; }
@@ -528,14 +540,20 @@ public:
return const_cast<UserDefinedLiteral*>(this)->getCookedLiteral();
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const {
if (getLiteralOperatorKind() == LOK_Template)
return getRParenLoc();
return getArg(0)->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const { return getRParenLoc(); }
/// Returns the location of a ud-suffix in the expression.
@@ -569,9 +587,15 @@ public:
bool getValue() const { return Value; }
void setValue(bool V) { Value = V; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
SourceLocation getLocation() const { return Loc; }
@@ -602,9 +626,15 @@ public:
explicit CXXNullPtrLiteralExpr(EmptyShell Empty)
: Expr(CXXNullPtrLiteralExprClass, Empty) {}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
SourceLocation getLocation() const { return Loc; }
@@ -641,12 +671,18 @@ public:
Expr *getSubExpr() { return static_cast<Expr*>(SubExpr); }
const Expr *getSubExpr() const { return static_cast<const Expr*>(SubExpr); }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return SubExpr->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubExpr->getEndLoc();
}
@@ -735,9 +771,15 @@ public:
Operand = E;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
void setSourceRange(SourceRange R) { Range = R; }
@@ -792,7 +834,10 @@ public:
return getBaseExpr() && getBaseExpr()->isImplicitCXXThis();
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const {
if (!isImplicitAccess())
return BaseExpr->getBeginLoc();
@@ -802,7 +847,10 @@ public:
return MemberLoc;
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const { return getMemberLoc(); }
child_range children() {
@@ -863,12 +911,18 @@ public:
Expr *getIdx() { return cast<Expr>(SubExprs[IDX_EXPR]); }
const Expr *getIdx() const { return cast<Expr>(SubExprs[IDX_EXPR]); }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getBase()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RBracketLoc; }
SourceLocation getRBracketLoc() const { return RBracketLoc; }
@@ -951,9 +1005,15 @@ public:
void setUuidStr(StringRef US) { UuidStr = US; }
StringRef getUuidStr() const { return UuidStr; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
void setSourceRange(SourceRange R) { Range = R; }
@@ -1002,9 +1062,15 @@ public:
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
bool isImplicit() const { return Implicit; }
@@ -1059,10 +1125,16 @@ public:
/// this variable.
bool isThrownVariableInScope() const { return IsThrownVariableInScope; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return ThrowLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
if (!getSubExpr())
return ThrowLoc;
@@ -1132,9 +1204,15 @@ public:
/// Default argument expressions have no representation in the
/// source, so they have an empty source range.
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
SourceLocation getExprLoc() const LLVM_READONLY { return Loc; }
@@ -1194,9 +1272,15 @@ public:
return Field->getInClassInitializer();
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
static bool classof(const Stmt *T) {
@@ -1269,12 +1353,18 @@ public:
Expr *getSubExpr() { return cast<Expr>(SubExpr); }
void setSubExpr(Expr *E) { SubExpr = E; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return SubExpr->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubExpr->getEndLoc();
}
@@ -1430,9 +1520,15 @@ public:
Args[Arg] = ArgExpr;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
SourceRange getParenOrBraceRange() const { return ParenOrBraceRange; }
void setParenOrBraceRange(SourceRange Range) { ParenOrBraceRange = Range; }
@@ -1504,9 +1600,15 @@ public:
bool inheritedFromVBase() const { return InheritedFromVirtualBase; }
SourceLocation getLocation() const LLVM_READONLY { return Loc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
static bool classof(const Stmt *T) {
@@ -1569,9 +1671,15 @@ public:
/// Determine whether this expression models list-initialization.
bool isListInitialization() const { return LParenLoc.isInvalid(); }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
@@ -1615,9 +1723,15 @@ public:
TypeSourceInfo *getTypeSourceInfo() const { return Type; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
@@ -1854,12 +1968,18 @@ public:
return T->getStmtClass() == LambdaExprClass;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return IntroducerRange.getBegin();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return ClosingBrace; }
child_range children() {
@@ -1895,9 +2015,15 @@ public:
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -2117,7 +2243,10 @@ public:
return SubExprs + Array + hasInitializer() + getNumPlacementArgs();
}
- SourceLocation getStartLoc() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getStartLoc() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const { return Range.getBegin(); }
SourceLocation getEndLoc() const { return Range.getEnd(); }
@@ -2127,8 +2256,14 @@ public:
return Range;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXNewExprClass;
@@ -2205,9 +2340,15 @@ public:
/// be a pointer, return an invalid type.
QualType getDestroyedType() const;
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return Argument->getEndLoc();
}
@@ -2395,11 +2536,17 @@ public:
DestroyedType = PseudoDestructorTypeStorage(Info);
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return Base->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
@@ -2481,9 +2628,15 @@ public:
getNumArgs());
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -2544,9 +2697,15 @@ public:
virtual ~ArrayTypeTraitExpr() = default;
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParen; }
ArrayTypeTrait getTrait() const { return static_cast<ArrayTypeTrait>(ATT); }
@@ -2610,9 +2769,15 @@ public:
explicit ExpressionTraitExpr(EmptyShell Empty)
: Expr(ExpressionTraitExprClass, Empty), ET(0), Value(false) {}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParen; }
ExpressionTrait getTrait() const { return static_cast<ExpressionTrait>(ET); }
@@ -2904,14 +3069,20 @@ public:
/// that was looked in to find these results.
CXXRecordDecl *getNamingClass() const { return NamingClass; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
if (NestedNameSpecifierLoc l = getQualifierLoc())
return l.getBeginLoc();
return getNameInfo().getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
if (hasExplicitTemplateArgs())
return getRAngleLoc();
@@ -3058,12 +3229,18 @@ public:
/// Note: getBeginLoc() is the start of the whole DependentScopeDeclRefExpr,
/// and differs from getLocation().getStart().
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return QualifierLoc.getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
if (hasExplicitTemplateArgs())
return getRAngleLoc();
@@ -3140,12 +3317,18 @@ public:
/// when modifying an existing AST to preserve its invariants.
void setSubExpr(Expr *E) { SubExpr = E; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return SubExpr->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubExpr->getEndLoc();
}
@@ -3269,10 +3452,16 @@ public:
*(arg_begin() + I) = E;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
if (!RParenLoc.isValid() && NumArgs > 0)
return getArg(NumArgs - 1)->getEndLoc();
@@ -3493,7 +3682,10 @@ public:
return {getTemplateArgs(), getNumTemplateArgs()};
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
if (!isImplicitAccess())
return Base->getBeginLoc();
@@ -3502,7 +3694,10 @@ public:
return MemberNameInfo.getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
if (hasExplicitTemplateArgs())
return getRAngleLoc();
@@ -3645,7 +3840,10 @@ public:
// diagnosing a problem with this expression.
SourceLocation getExprLoc() const LLVM_READONLY { return getMemberLoc(); }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
if (!isImplicitAccess())
return Base->getBeginLoc();
@@ -3654,7 +3852,10 @@ public:
return getMemberNameInfo().getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
if (hasExplicitTemplateArgs())
return getRAngleLoc();
@@ -3720,9 +3921,15 @@ public:
Expr *getOperand() const { return static_cast<Expr*>(Operand); }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
@@ -3800,12 +4007,18 @@ public:
return None;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return Pattern->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return EllipsisLoc; }
static bool classof(const Stmt *T) {
@@ -3926,9 +4139,15 @@ public:
return llvm::makeArrayRef(Args, Args + Length);
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return OperatorLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -3972,9 +4191,15 @@ public:
Param(param), Replacement(replacement), NameLoc(loc) {}
SourceLocation getNameLoc() const { return NameLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return NameLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return NameLoc; }
Expr *getReplacement() const { return cast<Expr>(Replacement); }
@@ -4038,9 +4263,15 @@ public:
/// template arguments.
TemplateArgument getArgumentPack() const;
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return NameLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return NameLoc; }
static bool classof(const Stmt *T) {
@@ -4113,9 +4344,15 @@ public:
/// Get an expansion of the parameter pack by index.
ParmVarDecl *getExpansion(unsigned I) const { return begin()[I]; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return NameLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return NameLoc; }
static bool classof(const Stmt *T) {
@@ -4227,12 +4464,18 @@ public:
return getValueKind() == VK_LValue;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getTemporary()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getTemporary()->getEndLoc();
}
@@ -4304,10 +4547,16 @@ public:
SourceLocation getEllipsisLoc() const { return EllipsisLoc; }
BinaryOperatorKind getOperator() const { return Opcode; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -4397,10 +4646,16 @@ public:
return static_cast<Expr*>(SubExprs[SubExpr::Resume]);
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getCommonExpr()->getEndLoc();
}
@@ -4485,10 +4740,16 @@ public:
SourceLocation getKeywordLoc() const { return KeywordLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getOperand()->getEndLoc();
}
Modified: cfe/trunk/include/clang/AST/ExprObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprObjC.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprObjC.h (original)
+++ cfe/trunk/include/clang/AST/ExprObjC.h Thu Aug 9 15:45:38 2018
@@ -67,9 +67,15 @@ public:
SourceLocation getAtLoc() const { return AtLoc; }
void setAtLoc(SourceLocation L) { AtLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return String->getEndLoc(); }
// Iterators
@@ -96,9 +102,15 @@ public:
bool getValue() const { return Value; }
void setValue(bool V) { Value = V; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
SourceLocation getLocation() const { return Loc; }
@@ -145,9 +157,15 @@ public:
SourceLocation getAtLoc() const { return Range.getBegin(); }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY {
@@ -200,9 +218,15 @@ public:
static ObjCArrayLiteral *CreateEmpty(const ASTContext &C,
unsigned NumElements);
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
@@ -367,9 +391,15 @@ public:
return DictWithObjectsMethod;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
@@ -422,9 +452,15 @@ public:
EncodedType = EncType;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
// Iterators
@@ -459,9 +495,15 @@ public:
void setAtLoc(SourceLocation L) { AtLoc = L; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
/// getNumArgs - Return the number of actual arguments to this call.
@@ -510,9 +552,15 @@ public:
void setAtLoc(SourceLocation L) { AtLoc = L; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
// Iterators
@@ -572,11 +620,17 @@ public:
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return isFreeIvar() ? Loc : getBase()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
SourceLocation getOpLoc() const { return OpLoc; }
@@ -760,13 +814,19 @@ public:
/// Determine the type of the base, regardless of the kind of receiver.
QualType getReceiverType(const ASTContext &ctx) const;
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return isObjectReceiver() ? getBase()->getBeginLoc()
: getReceiverLocation();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return IdLoc; }
// Iterators
@@ -859,12 +919,18 @@ public:
SourceLocation getRBracket() const { return RBracket; }
void setRBracket(SourceLocation RB) { RBracket = RB; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return SubExprs[BASE]->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RBracket; }
Expr *getBaseExpr() const { return cast<Expr>(SubExprs[BASE]); }
@@ -1418,9 +1484,15 @@ public:
RBracLoc = R.getEnd();
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return LBracLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RBracLoc; }
// Iterators
@@ -1497,7 +1569,10 @@ public:
SourceLocation getOpLoc() const { return OpLoc; }
void setOpLoc(SourceLocation L) { OpLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getBase()->getBeginLoc();
}
@@ -1506,7 +1581,10 @@ public:
return getBase()->getEndLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return IsaMemberLoc; }
SourceLocation getExprLoc() const LLVM_READONLY { return IsaMemberLoc; }
@@ -1576,11 +1654,17 @@ public:
child_range children() { return child_range(&Operand, &Operand+1); }
// Source locations are determined by the subexpression.
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return Operand->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return Operand->getEndLoc();
}
@@ -1642,10 +1726,16 @@ public:
/// The location of the bridge keyword.
SourceLocation getBridgeKeywordLoc() const { return BridgeKeywordLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getSubExpr()->getEndLoc();
}
@@ -1684,9 +1774,15 @@ public:
explicit ObjCAvailabilityCheckExpr(EmptyShell Shell)
: Expr(ObjCAvailabilityCheckExprClass, Shell) {}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const { return AtLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const { return RParen; }
SourceRange getSourceRange() const { return {AtLoc, RParen}; }
Modified: cfe/trunk/include/clang/AST/ExprOpenMP.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprOpenMP.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprOpenMP.h (original)
+++ cfe/trunk/include/clang/AST/ExprOpenMP.h Thu Aug 9 15:45:38 2018
@@ -101,11 +101,17 @@ public:
/// Set length of the array section.
void setLength(Expr *E) { SubExprs[LENGTH] = E; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getBase()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RBracketLoc; }
SourceLocation getColonLoc() const { return ColonLoc; }
Modified: cfe/trunk/include/clang/AST/OpenMPClause.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/OpenMPClause.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/OpenMPClause.h (original)
+++ cfe/trunk/include/clang/AST/OpenMPClause.h Thu Aug 9 15:45:38 2018
@@ -64,11 +64,17 @@ protected:
public:
/// Returns the starting location of the clause.
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const { return StartLoc; }
/// Returns the ending location of the clause.
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const { return EndLoc; }
/// Sets the starting location of the clause.
Modified: cfe/trunk/include/clang/AST/RawCommentList.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RawCommentList.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RawCommentList.h (original)
+++ cfe/trunk/include/clang/AST/RawCommentList.h Thu Aug 9 15:45:38 2018
@@ -101,9 +101,15 @@ public:
}
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
const char *getBriefText(const ASTContext &Context) const {
Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Thu Aug 9 15:45:38 2018
@@ -398,9 +398,15 @@ public:
/// 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 { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
// global temp stats (until we have a per-module visitor)
@@ -524,14 +530,23 @@ public:
DeclGroupRef getDeclGroup() { return DG; }
void setDeclGroup(DeclGroupRef DGR) { DG = DGR; }
- SourceLocation getStartLoc() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getStartLoc() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ 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 getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return StartLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return EndLoc; }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return EndLoc;
+ }
static bool classof(const Stmt *T) {
return T->getStmtClass() == DeclStmtClass;
@@ -598,9 +613,15 @@ public:
bool hasLeadingEmptyMacro() const { return HasLeadingEmptyMacro; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return SemiLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return SemiLoc; }
static bool classof(const Stmt *T) {
@@ -700,9 +721,15 @@ public:
return const_reverse_body_iterator(body_begin());
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return LBraceLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RBraceLoc; }
SourceLocation getLBracLoc() const { return LBraceLoc; }
@@ -751,9 +778,15 @@ public:
return const_cast<SwitchCase*>(this)->getSubStmt();
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
@@ -806,10 +839,16 @@ public:
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 getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
// Handle deeply nested case statements with iteration instead of recursion.
const CaseStmt *CS = this;
@@ -849,9 +888,15 @@ public:
SourceLocation getColonLoc() const { return ColonLoc; }
void setColonLoc(SourceLocation L) { ColonLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubStmt->getEndLoc();
}
@@ -897,9 +942,15 @@ public:
void setIdentLoc(SourceLocation L) { IdentLoc = L; }
void setSubStmt(Stmt *SS) { SubStmt = SS; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return IdentLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubStmt->getEndLoc();
}
@@ -956,9 +1007,15 @@ public:
Stmt *getSubStmt() { return SubStmt; }
const Stmt *getSubStmt() const { return SubStmt; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AttrLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubStmt->getEndLoc();
}
@@ -1028,10 +1085,16 @@ public:
bool isObjCAvailabilityCheck() const;
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return IfLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
if (SubExprs[ELSE])
return SubExprs[ELSE]->getEndLoc();
@@ -1125,10 +1188,16 @@ public:
/// have been explicitly covered.
bool isAllEnumCasesCovered() const { return FirstCase.getInt(); }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return SwitchLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubExprs[BODY] ? SubExprs[BODY]->getEndLoc()
: SubExprs[COND]->getEndLoc();
@@ -1184,10 +1253,16 @@ public:
SourceLocation getWhileLoc() const { return WhileLoc; }
void setWhileLoc(SourceLocation L) { WhileLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return WhileLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubExprs[BODY]->getEndLoc();
}
@@ -1236,9 +1311,15 @@ public:
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return DoLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -1308,10 +1389,16 @@ public:
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return ForLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubExprs[BODY]->getEndLoc();
}
@@ -1347,9 +1434,15 @@ public:
SourceLocation getLabelLoc() const { return LabelLoc; }
void setLabelLoc(SourceLocation L) { LabelLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return GotoLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return LabelLoc; }
static bool classof(const Stmt *T) {
@@ -1394,9 +1487,15 @@ public:
return const_cast<IndirectGotoStmt*>(this)->getConstantTarget();
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return GotoLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Target->getEndLoc(); }
static bool classof(const Stmt *T) {
@@ -1420,9 +1519,15 @@ public:
SourceLocation getContinueLoc() const { return ContinueLoc; }
void setContinueLoc(SourceLocation L) { ContinueLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return ContinueLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return ContinueLoc; }
static bool classof(const Stmt *T) {
@@ -1451,9 +1556,15 @@ public:
SourceLocation getBreakLoc() const { return BreakLoc; }
void setBreakLoc(SourceLocation L) { BreakLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return BreakLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return BreakLoc; }
static bool classof(const Stmt *T) {
@@ -1504,10 +1615,16 @@ public:
const VarDecl *getNRVOCandidate() const { return NRVOCandidate; }
void setNRVOCandidate(const VarDecl *Var) { NRVOCandidate = Var; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return RetLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return RetExpr ? RetExpr->getEndLoc() : RetLoc;
}
@@ -1563,9 +1680,15 @@ public:
bool isVolatile() const { return IsVolatile; }
void setVolatile(bool V) { IsVolatile = V; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return {}; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return {}; }
//===--- Asm String Analysis ---===//
@@ -1847,9 +1970,15 @@ public:
return Clobbers[i];
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AsmLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
static bool classof(const Stmt *T) {
@@ -1947,9 +2076,15 @@ private:
ArrayRef<Expr*> Exprs, ArrayRef<StringRef> Clobbers);
public:
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AsmLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
static bool classof(const Stmt *T) {
return T->getStmtClass() == MSAsmStmtClass;
@@ -1978,9 +2113,15 @@ public:
Expr *FilterExpr,
Stmt *Block);
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return getExceptLoc(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getExceptLoc() const { return Loc; }
SourceLocation getEndLoc() const { return getBlock()->getEndLoc(); }
@@ -2017,9 +2158,15 @@ public:
SourceLocation FinallyLoc,
Stmt *Block);
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return getFinallyLoc(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getFinallyLoc() const { return Loc; }
SourceLocation getEndLoc() const { return Block->getEndLoc(); }
@@ -2057,9 +2204,15 @@ public:
SourceLocation TryLoc, Stmt *TryBlock,
Stmt *Handler);
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return getTryLoc(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getTryLoc() const { return TryLoc; }
SourceLocation getEndLoc() const { return Children[HANDLER]->getEndLoc(); }
@@ -2099,9 +2252,15 @@ public:
SourceLocation getLeaveLoc() const { return LeaveLoc; }
void setLeaveLoc(SourceLocation L) { LeaveLoc = L; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return LeaveLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return LeaveLoc; }
static bool classof(const Stmt *T) {
@@ -2315,12 +2474,18 @@ public:
return capture_init_begin() + NumCaptures;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getCapturedStmt()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getCapturedStmt()->getEndLoc();
}
Modified: cfe/trunk/include/clang/AST/StmtCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtCXX.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/StmtCXX.h (original)
+++ cfe/trunk/include/clang/AST/StmtCXX.h Thu Aug 9 15:45:38 2018
@@ -41,9 +41,15 @@ public:
CXXCatchStmt(EmptyShell Empty)
: Stmt(CXXCatchStmtClass), ExceptionDecl(nullptr), HandlerBlock(nullptr) {}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return CatchLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return HandlerBlock->getEndLoc();
}
@@ -88,9 +94,15 @@ public:
static CXXTryStmt *Create(const ASTContext &C, EmptyShell Empty,
unsigned numHandlers);
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return getTryLoc(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getTryLoc() const { return TryLoc; }
SourceLocation getEndLoc() const {
@@ -197,9 +209,15 @@ public:
SourceLocation getColonLoc() const { return ColonLoc; }
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return ForLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubExprs[BODY]->getEndLoc();
}
@@ -285,9 +303,15 @@ public:
return reinterpret_cast<CompoundStmt *>(SubStmt);
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubStmt->getEndLoc();
}
@@ -408,12 +432,18 @@ public:
return {getStoredStmts() + SubStmt::FirstParamMove, NumParams};
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return getBody() ? getBody()->getBeginLoc()
: getPromiseDecl()->getBeginLoc();
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getBody() ? getBody()->getEndLoc() : getPromiseDecl()->getEndLoc();
}
@@ -475,9 +505,15 @@ public:
bool isImplicit() const { return IsImplicit; }
void setIsImplicit(bool value = true) { IsImplicit = value; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return CoreturnLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getOperand() ? getOperand()->getEndLoc() : getBeginLoc();
}
Modified: cfe/trunk/include/clang/AST/StmtObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtObjC.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/StmtObjC.h (original)
+++ cfe/trunk/include/clang/AST/StmtObjC.h Thu Aug 9 15:45:38 2018
@@ -55,9 +55,15 @@ public:
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation Loc) { RParenLoc = Loc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return ForLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubExprs[BODY]->getEndLoc();
}
@@ -106,9 +112,15 @@ public:
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation Loc) { RParenLoc = Loc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AtCatchLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Body->getEndLoc(); }
bool hasEllipsis() const { return getCatchParamDecl() == nullptr; }
@@ -137,9 +149,15 @@ public:
Stmt *getFinallyBody() { return AtFinallyStmt; }
void setFinallyBody(Stmt *S) { AtFinallyStmt = S; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AtFinallyLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return AtFinallyStmt->getEndLoc();
}
@@ -244,9 +262,15 @@ public:
getStmts()[1 + NumCatchStmts] = S;
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AtTryLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY;
static bool classof(const Stmt *T) {
@@ -303,9 +327,15 @@ public:
}
void setSynchExpr(Stmt *S) { SubStmts[SYNC_EXPR] = S; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AtSynchronizedLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return getSynchBody()->getEndLoc();
}
@@ -339,9 +369,15 @@ public:
SourceLocation getThrowLoc() const LLVM_READONLY { return AtThrowLoc; }
void setThrowLoc(SourceLocation Loc) { AtThrowLoc = Loc; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AtThrowLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return Throw ? Throw->getEndLoc() : AtThrowLoc;
}
@@ -369,9 +405,15 @@ public:
Stmt *getSubStmt() { return SubStmt; }
void setSubStmt(Stmt *S) { SubStmt = S; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY {
return SubStmt->getEndLoc();
}
Modified: cfe/trunk/include/clang/AST/StmtOpenMP.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtOpenMP.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/StmtOpenMP.h (original)
+++ cfe/trunk/include/clang/AST/StmtOpenMP.h Thu Aug 9 15:45:38 2018
@@ -165,10 +165,16 @@ public:
}
/// Returns starting location of directive kind.
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const { return StartLoc; }
/// Returns ending location of directive.
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const { return EndLoc; }
/// Set starting location of directive kind.
Modified: cfe/trunk/include/clang/AST/TypeLoc.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLoc.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/TypeLoc.h (original)
+++ cfe/trunk/include/clang/AST/TypeLoc.h Thu Aug 9 15:45:38 2018
@@ -151,8 +151,14 @@ public:
return SourceRange(getBeginLoc(), getEndLoc());
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
/// Get the local source range.
SourceRange getLocalSourceRange() const {
Modified: cfe/trunk/include/clang/Analysis/CloneDetection.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/CloneDetection.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/CloneDetection.h (original)
+++ cfe/trunk/include/clang/Analysis/CloneDetection.h Thu Aug 9 15:45:38 2018
@@ -122,7 +122,10 @@ public:
/// 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 LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getStartLoc() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const;
/// Returns the end sourcelocation of the last statement in this sequence.
Modified: cfe/trunk/include/clang/Sema/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/DeclSpec.h?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/DeclSpec.h (original)
+++ cfe/trunk/include/clang/Sema/DeclSpec.h Thu Aug 9 15:45:38 2018
@@ -505,9 +505,15 @@ public:
const CXXScopeSpec &getTypeSpecScope() const { return TypeScope; }
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
SourceLocation getTypeSpecWidthLoc() const { return TSWRange.getBegin(); }
@@ -1122,9 +1128,15 @@ public:
SourceRange getSourceRange() const LLVM_READONLY {
return SourceRange(StartLocation, EndLocation);
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return StartLocation; }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return EndLocation; }
};
@@ -1874,9 +1886,15 @@ public:
/// Get the source range that spans this declarator.
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
void SetSourceRange(SourceRange R) { Range = R; }
Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp (original)
+++ cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Thu Aug 9 15:45:38 2018
@@ -67,7 +67,10 @@ public:
void setStartLoc(SourceLocation Loc) { LocStart = Loc; }
- SourceLocation getStartLoc() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getStartLoc() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const {
assert(LocStart && "Region has no start location");
return *LocStart;
Modified: cfe/trunk/lib/Sema/SemaChecking.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=339403&r1=339402&r2=339403&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Thu Aug 9 15:45:38 2018
@@ -6111,12 +6111,18 @@ class FormatStringLiteral {
StartToken, StartTokenByteOffset);
}
- SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocStart() const LLVM_READONLY,
+ "Use getBeginLoc instead") {
+ return getBeginLoc();
+ }
SourceLocation getBeginLoc() const LLVM_READONLY {
return FExpr->getBeginLoc().getLocWithOffset(Offset);
}
- SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+ LLVM_ATTRIBUTE_DEPRECATED(SourceLocation getLocEnd() const LLVM_READONLY,
+ "Use getEndLoc instead") {
+ return getEndLoc();
+ }
SourceLocation getEndLoc() const LLVM_READONLY { return FExpr->getEndLoc(); }
};
More information about the cfe-commits
mailing list