diff options
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 263f7ca1133..8ce960ff5ff 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -1937,7 +1937,7 @@ VarDecl::TLSKind VarDecl::getTLSKind() const { SourceRange VarDecl::getSourceRange() const { if (const Expr *Init = getInit()) { - SourceLocation InitEnd = Init->getLocEnd(); + SourceLocation InitEnd = Init->getEndLoc(); // If Init is implicit, ignore its source range and fallback on // DeclaratorDecl::getSourceRange() to handle postfix elements. if (InitEnd.isValid() && InitEnd != getLocation()) @@ -2704,7 +2704,7 @@ Stmt *FunctionDecl::getBody(const FunctionDecl *&Definition) const { void FunctionDecl::setBody(Stmt *B) { Body = B; if (B) - EndRangeLoc = B->getLocEnd(); + EndRangeLoc = B->getEndLoc(); } void FunctionDecl::setPure(bool P) { @@ -3781,7 +3781,7 @@ SourceRange FieldDecl::getSourceRange() const { if (!FinalExpr) FinalExpr = getBitWidth(); if (FinalExpr) - return SourceRange(getInnerLocStart(), FinalExpr->getLocEnd()); + return SourceRange(getInnerLocStart(), FinalExpr->getEndLoc()); return DeclaratorDecl::getSourceRange(); } @@ -4258,7 +4258,7 @@ bool BlockDecl::capturesVariable(const VarDecl *variable) const { } SourceRange BlockDecl::getSourceRange() const { - return SourceRange(getLocation(), Body? Body->getLocEnd() : getLocation()); + return SourceRange(getLocation(), Body ? Body->getEndLoc() : getLocation()); } //===----------------------------------------------------------------------===// @@ -4474,7 +4474,7 @@ IndirectFieldDecl *IndirectFieldDecl::CreateDeserialized(ASTContext &C, SourceRange EnumConstantDecl::getSourceRange() const { SourceLocation End = getLocation(); if (Init) - End = Init->getLocEnd(); + End = Init->getEndLoc(); return SourceRange(getLocation(), End); } |