steveire created this revision.
Herald added a subscriber: cfe-commits.

Repository:
  rC Clang

https://reviews.llvm.org/D50348

Files:
  include/clang/AST/Comment.h
  include/clang/AST/Decl.h
  include/clang/AST/DeclBase.h
  include/clang/AST/DeclCXX.h
  include/clang/AST/DeclObjC.h
  include/clang/AST/DeclarationName.h
  include/clang/AST/Expr.h
  include/clang/AST/ExprCXX.h
  include/clang/AST/ExprObjC.h
  include/clang/AST/ExprOpenMP.h
  include/clang/AST/OpenMPClause.h
  include/clang/AST/RawCommentList.h
  include/clang/AST/Stmt.h
  include/clang/AST/StmtCXX.h
  include/clang/AST/StmtObjC.h
  include/clang/AST/StmtOpenMP.h
  include/clang/AST/TypeLoc.h
  include/clang/Sema/DeclSpec.h
  lib/AST/DeclObjC.cpp
  lib/AST/Expr.cpp
  lib/AST/ExprCXX.cpp
  lib/AST/Stmt.cpp
  lib/AST/StmtObjC.cpp
  lib/Sema/SemaChecking.cpp

Index: lib/Sema/SemaChecking.cpp
===================================================================
--- lib/Sema/SemaChecking.cpp
+++ lib/Sema/SemaChecking.cpp
@@ -6126,7 +6126,8 @@
     return FExpr->getLocStart().getLocWithOffset(Offset);
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY { return FExpr->getLocEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return FExpr->getLocEnd(); }
 };
 
 }  // namespace
Index: lib/AST/StmtObjC.cpp
===================================================================
--- lib/AST/StmtObjC.cpp
+++ lib/AST/StmtObjC.cpp
@@ -64,7 +64,7 @@
   return new (Mem) ObjCAtTryStmt(EmptyShell(), NumCatchStmts, HasFinally);
 }
 
-SourceLocation ObjCAtTryStmt::getLocEnd() const {
+SourceLocation ObjCAtTryStmt::getEndLoc() const {
   if (HasFinally)
     return getFinallyStmt()->getLocEnd();
   if (NumCatchStmts)
Index: lib/AST/Stmt.cpp
===================================================================
--- lib/AST/Stmt.cpp
+++ lib/AST/Stmt.cpp
@@ -288,7 +288,7 @@
   llvm_unreachable("unknown statement kind");
 }
 
-SourceLocation Stmt::getLocEnd() const {
+SourceLocation Stmt::getEndLoc() const {
   switch (getStmtClass()) {
   case Stmt::NoStmtClass: llvm_unreachable("statement without class");
 #define ABSTRACT_STMT(type)
Index: lib/AST/ExprCXX.cpp
===================================================================
--- lib/AST/ExprCXX.cpp
+++ lib/AST/ExprCXX.cpp
@@ -250,7 +250,7 @@
   return QualType();
 }
 
-SourceLocation CXXPseudoDestructorExpr::getLocEnd() const {
+SourceLocation CXXPseudoDestructorExpr::getEndLoc() const {
   SourceLocation End = DestroyedType.getLocation();
   if (TypeSourceInfo *TInfo = DestroyedType.getTypeSourceInfo())
     End = TInfo->getTypeLoc().getLocalSourceRange().getEnd();
@@ -456,7 +456,7 @@
   return Loc;
 }
 
-SourceLocation CXXConstructExpr::getLocEnd() const {
+SourceLocation CXXConstructExpr::getEndLoc() const {
   if (isa<CXXTemporaryObjectExpr>(this))
     return cast<CXXTemporaryObjectExpr>(this)->getLocEnd();
 
@@ -695,7 +695,7 @@
   return getTypeInfoAsWritten()->getTypeLoc().getLocStart();
 }
 
-SourceLocation CXXFunctionalCastExpr::getLocEnd() const {
+SourceLocation CXXFunctionalCastExpr::getEndLoc() const {
   return RParenLoc.isValid() ? RParenLoc : getSubExpr()->getLocEnd();
 }
 
@@ -780,7 +780,7 @@
   return Type->getTypeLoc().getBeginLoc();
 }
 
-SourceLocation CXXTemporaryObjectExpr::getLocEnd() const {
+SourceLocation CXXTemporaryObjectExpr::getEndLoc() const {
   SourceLocation Loc = getParenOrBraceRange().getEnd();
   if (Loc.isInvalid() && getNumArgs())
     Loc = getArg(getNumArgs()-1)->getLocEnd();
Index: lib/AST/Expr.cpp
===================================================================
--- lib/AST/Expr.cpp
+++ lib/AST/Expr.cpp
@@ -452,7 +452,7 @@
     return getQualifierLoc().getBeginLoc();
   return getNameInfo().getLocStart();
 }
-SourceLocation DeclRefExpr::getLocEnd() const {
+SourceLocation DeclRefExpr::getEndLoc() const {
   if (hasExplicitTemplateArgs())
     return getRAngleLoc();
   return getNameInfo().getLocEnd();
@@ -1367,7 +1367,7 @@
     begin = getArg(0)->getLocStart();
   return begin;
 }
-SourceLocation CallExpr::getLocEnd() const {
+SourceLocation CallExpr::getEndLoc() const {
   if (isa<CXXOperatorCallExpr>(this))
     return cast<CXXOperatorCallExpr>(this)->getLocEnd();
 
@@ -1543,7 +1543,7 @@
     return BaseStartLoc;
   return MemberLoc;
 }
-SourceLocation MemberExpr::getLocEnd() const {
+SourceLocation MemberExpr::getEndLoc() const {
   SourceLocation EndLoc = getMemberNameInfo().getEndLoc();
   if (hasExplicitTemplateArgs())
     EndLoc = getRAngleLoc();
@@ -2034,7 +2034,7 @@
   return Beg;
 }
 
-SourceLocation InitListExpr::getLocEnd() const {
+SourceLocation InitListExpr::getEndLoc() const {
   if (InitListExpr *SyntacticForm = getSyntacticForm())
     return SyntacticForm->getLocEnd();
   SourceLocation End = RBraceLoc;
@@ -3862,7 +3862,7 @@
   return StartLoc;
 }
 
-SourceLocation DesignatedInitExpr::getLocEnd() const {
+SourceLocation DesignatedInitExpr::getEndLoc() const {
   return getInit()->getLocEnd();
 }
 
@@ -3925,7 +3925,7 @@
   return getBase()->getLocStart();
 }
 
-SourceLocation DesignatedInitUpdateExpr::getLocEnd() const {
+SourceLocation DesignatedInitUpdateExpr::getEndLoc() const {
   return getBase()->getLocEnd();
 }
 
Index: lib/AST/DeclObjC.cpp
===================================================================
--- lib/AST/DeclObjC.cpp
+++ lib/AST/DeclObjC.cpp
@@ -931,7 +931,7 @@
   return this;
 }
 
-SourceLocation ObjCMethodDecl::getLocEnd() const {
+SourceLocation ObjCMethodDecl::getEndLoc() const {
   if (Stmt *Body = getBody())
     return Body->getLocEnd();
   return DeclEndLoc;
Index: include/clang/Sema/DeclSpec.h
===================================================================
--- include/clang/Sema/DeclSpec.h
+++ include/clang/Sema/DeclSpec.h
@@ -507,7 +507,8 @@
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
 
   SourceLocation getTypeSpecWidthLoc() const { return TSWRange.getBegin(); }
   SourceRange getTypeSpecWidthRange() const { return TSWRange; }
@@ -1123,7 +1124,8 @@
   }
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return StartLocation; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return EndLocation; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return EndLocation; }
 };
 
 /// A set of tokens that has been cached for later parsing.
@@ -1874,7 +1876,8 @@
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
 
   void SetSourceRange(SourceRange R) { Range = R; }
   /// SetRangeBegin - Set the start of the source range to Loc, unless it's
Index: include/clang/AST/TypeLoc.h
===================================================================
--- include/clang/AST/TypeLoc.h
+++ include/clang/AST/TypeLoc.h
@@ -152,7 +152,7 @@
   }
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
-  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
 
   /// Get the local source range.
   SourceRange getLocalSourceRange() const {
Index: include/clang/AST/StmtOpenMP.h
===================================================================
--- include/clang/AST/StmtOpenMP.h
+++ include/clang/AST/StmtOpenMP.h
@@ -168,7 +168,8 @@
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const { return StartLoc; }
   /// Returns ending location of directive.
-  SourceLocation getLocEnd() const { return EndLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const { return EndLoc; }
 
   /// Set starting location of directive kind.
   ///
Index: include/clang/AST/StmtObjC.h
===================================================================
--- include/clang/AST/StmtObjC.h
+++ include/clang/AST/StmtObjC.h
@@ -57,7 +57,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return ForLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return SubExprs[BODY]->getLocEnd();
   }
 
@@ -107,7 +108,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AtCatchLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Body->getLocEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Body->getLocEnd(); }
 
   bool hasEllipsis() const { return getCatchParamDecl() == nullptr; }
 
@@ -137,7 +139,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AtFinallyLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return AtFinallyStmt->getLocEnd();
   }
 
@@ -243,7 +246,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AtTryLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == ObjCAtTryStmtClass;
@@ -301,7 +305,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AtSynchronizedLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getSynchBody()->getLocEnd();
   }
 
@@ -336,7 +341,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AtThrowLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return Throw ? Throw->getLocEnd() : AtThrowLoc;
   }
 
@@ -365,7 +371,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return SubStmt->getLocEnd();}
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SubStmt->getLocEnd();}
 
   SourceLocation getAtLoc() const { return AtLoc; }
   void setAtLoc(SourceLocation Loc) { AtLoc = Loc; }
Index: include/clang/AST/StmtCXX.h
===================================================================
--- include/clang/AST/StmtCXX.h
+++ include/clang/AST/StmtCXX.h
@@ -43,7 +43,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return CatchLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return HandlerBlock->getLocEnd();
   }
 
@@ -89,7 +90,7 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return getTryLoc(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
 
   SourceLocation getTryLoc() const { return TryLoc; }
   SourceLocation getEndLoc() const {
@@ -198,7 +199,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return ForLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return SubExprs[BODY]->getLocEnd();
   }
 
@@ -285,7 +287,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return SubStmt->getLocEnd();}
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SubStmt->getLocEnd();}
 
   child_range children() {
     return child_range(&SubStmt, &SubStmt+1);
@@ -408,7 +411,8 @@
     return getBody() ? getBody()->getLocStart()
             : getPromiseDecl()->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getBody() ? getBody()->getLocEnd() : getPromiseDecl()->getLocEnd();
   }
 
@@ -471,7 +475,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return CoreturnLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getOperand() ? getOperand()->getLocEnd() : getLocStart();
   }
 
Index: include/clang/AST/Stmt.h
===================================================================
--- include/clang/AST/Stmt.h
+++ include/clang/AST/Stmt.h
@@ -400,7 +400,8 @@
   SourceRange getSourceRange() const LLVM_READONLY;
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   // global temp stats (until we have a per-module visitor)
   static void addStmtClass(const StmtClass s);
@@ -599,7 +600,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return SemiLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return SemiLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SemiLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == NullStmtClass;
@@ -700,7 +702,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return LBraceLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RBraceLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RBraceLoc; }
 
   SourceLocation getLBracLoc() const { return LBraceLoc; }
   SourceLocation getRBracLoc() const { return RBraceLoc; }
@@ -750,7 +753,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == CaseStmtClass ||
@@ -805,7 +809,8 @@
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     // Handle deeply nested case statements with iteration instead of recursion.
     const CaseStmt *CS = this;
     while (const auto *CS2 = dyn_cast<CaseStmt>(CS->getSubStmt()))
@@ -846,7 +851,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return SubStmt->getLocEnd();}
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SubStmt->getLocEnd();}
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == DefaultStmtClass;
@@ -856,7 +862,7 @@
   child_range children() { return child_range(&SubStmt, &SubStmt+1); }
 };
 
-inline SourceLocation SwitchCase::getLocEnd() const {
+inline SourceLocation SwitchCase::getEndLoc() const {
   if (const auto *CS = dyn_cast<CaseStmt>(this))
     return CS->getLocEnd();
   return cast<DefaultStmt>(this)->getLocEnd();
@@ -891,7 +897,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return IdentLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return SubStmt->getLocEnd();}
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SubStmt->getLocEnd();}
 
   child_range children() { return child_range(&SubStmt, &SubStmt+1); }
 
@@ -947,7 +954,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AttrLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return SubStmt->getLocEnd();}
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SubStmt->getLocEnd();}
 
   child_range children() { return child_range(&SubStmt, &SubStmt + 1); }
 
@@ -1017,7 +1025,8 @@
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return IfLoc; }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     if (SubExprs[ELSE])
       return SubExprs[ELSE]->getLocEnd();
     else
@@ -1113,7 +1122,8 @@
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return SwitchLoc; }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return SubExprs[BODY] ? SubExprs[BODY]->getLocEnd() : SubExprs[COND]->getLocEnd();
   }
 
@@ -1170,7 +1180,8 @@
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return WhileLoc; }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return SubExprs[BODY]->getLocEnd();
   }
 
@@ -1220,7 +1231,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return DoLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == DoStmtClass;
@@ -1292,7 +1304,8 @@
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return ForLoc; }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return SubExprs[BODY]->getLocEnd();
   }
 
@@ -1329,7 +1342,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return GotoLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return LabelLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return LabelLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == GotoStmtClass;
@@ -1375,7 +1389,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return GotoLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Target->getLocEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Target->getLocEnd(); }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == IndirectGotoStmtClass;
@@ -1400,7 +1415,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return ContinueLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return ContinueLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return ContinueLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == ContinueStmtClass;
@@ -1430,7 +1446,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return BreakLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return BreakLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return BreakLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == BreakStmtClass;
@@ -1483,7 +1500,8 @@
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return RetLoc; }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return RetExpr ? RetExpr->getLocEnd() : RetLoc;
   }
 
@@ -1540,7 +1558,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return {}; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return {}; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return {}; }
 
   //===--- Asm String Analysis ---===//
 
@@ -1823,7 +1842,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AsmLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == GCCAsmStmtClass;
@@ -1922,7 +1942,7 @@
 public:
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AsmLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return EndLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == MSAsmStmtClass;
@@ -1953,7 +1973,7 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return getExceptLoc(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
 
   SourceLocation getExceptLoc() const { return Loc; }
   SourceLocation getEndLoc() const { return getBlock()->getLocEnd(); }
@@ -1992,7 +2012,7 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return getFinallyLoc(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
 
   SourceLocation getFinallyLoc() const { return Loc; }
   SourceLocation getEndLoc() const { return Block->getLocEnd(); }
@@ -2032,7 +2052,7 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return getTryLoc(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
 
   SourceLocation getTryLoc() const { return TryLoc; }
   SourceLocation getEndLoc() const { return Children[HANDLER]->getLocEnd(); }
@@ -2074,7 +2094,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return LeaveLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return LeaveLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return LeaveLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == SEHLeaveStmtClass;
@@ -2292,7 +2313,8 @@
     return getCapturedStmt()->getLocStart();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getCapturedStmt()->getLocEnd();
   }
 
Index: include/clang/AST/RawCommentList.h
===================================================================
--- include/clang/AST/RawCommentList.h
+++ include/clang/AST/RawCommentList.h
@@ -103,7 +103,8 @@
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
 
   const char *getBriefText(const ASTContext &Context) const {
     if (BriefTextValid)
Index: include/clang/AST/OpenMPClause.h
===================================================================
--- include/clang/AST/OpenMPClause.h
+++ include/clang/AST/OpenMPClause.h
@@ -68,7 +68,8 @@
   SourceLocation getBeginLoc() const { return StartLoc; }
 
   /// Returns the ending location of the clause.
-  SourceLocation getLocEnd() const { return EndLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const { return EndLoc; }
 
   /// Sets the starting location of the clause.
   void setLocStart(SourceLocation Loc) { StartLoc = Loc; }
Index: include/clang/AST/ExprOpenMP.h
===================================================================
--- include/clang/AST/ExprOpenMP.h
+++ include/clang/AST/ExprOpenMP.h
@@ -105,7 +105,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return getBase()->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RBracketLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RBracketLoc; }
 
   SourceLocation getColonLoc() const { return ColonLoc; }
   void setColonLoc(SourceLocation L) { ColonLoc = L; }
Index: include/clang/AST/ExprObjC.h
===================================================================
--- include/clang/AST/ExprObjC.h
+++ include/clang/AST/ExprObjC.h
@@ -69,7 +69,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return String->getLocEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return String->getLocEnd(); }
 
   // Iterators
   child_range children() { return child_range(&String, &String+1); }
@@ -97,7 +98,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   SourceLocation getLocation() const { return Loc; }
   void setLocation(SourceLocation L) { Loc = L; }
@@ -145,7 +147,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
 
   SourceRange getSourceRange() const LLVM_READONLY {
     return Range;
@@ -199,7 +202,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
 
   /// Retrieve elements of array of literals.
@@ -365,7 +369,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
 
   // Iterators
@@ -419,7 +424,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   // Iterators
   child_range children() {
@@ -455,7 +461,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   /// getNumArgs - Return the number of actual arguments to this call.
   unsigned getNumArgs() const { return SelName.getNumArgs(); }
@@ -505,7 +512,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   // Iterators
   child_range children() {
@@ -568,7 +576,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return isFreeIvar() ? Loc : getBase()->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   SourceLocation getOpLoc() const { return OpLoc; }
   void setOpLoc(SourceLocation L) { OpLoc = L; }
@@ -756,7 +765,8 @@
     return isObjectReceiver() ? getBase()->getLocStart() :getReceiverLocation();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY { return IdLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return IdLoc; }
 
   // Iterators
   child_range children() {
@@ -853,7 +863,8 @@
     return SubExprs[BASE]->getLocStart();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY { return RBracket; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RBracket; }
 
   Expr *getBaseExpr() const { return cast<Expr>(SubExprs[BASE]); }
   void setBaseExpr(Stmt *S) { SubExprs[BASE] = S; }
@@ -1408,7 +1419,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return LBracLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RBracLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RBracLoc; }
 
   // Iterators
   child_range children();
@@ -1493,7 +1505,8 @@
     return getBase()->getLocEnd();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY { return IsaMemberLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return IsaMemberLoc; }
 
   SourceLocation getExprLoc() const LLVM_READONLY { return IsaMemberLoc; }
 
@@ -1566,7 +1579,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return Operand->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Operand->getLocEnd();}
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Operand->getLocEnd();}
 
   SourceLocation getExprLoc() const LLVM_READONLY {
     return getSubExpr()->getExprLoc();
@@ -1623,7 +1637,8 @@
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getSubExpr()->getLocEnd();
   }
 
@@ -1663,7 +1678,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const { return AtLoc; }
-  SourceLocation getLocEnd() const { return RParen; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const { return RParen; }
   SourceRange getSourceRange() const { return {AtLoc, RParen}; }
 
   /// This may be '*', in which case this should fold to true.
Index: include/clang/AST/ExprCXX.h
===================================================================
--- include/clang/AST/ExprCXX.h
+++ include/clang/AST/ExprCXX.h
@@ -134,7 +134,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
   SourceRange getSourceRange() const { return Range; }
 
   static bool classof(const Stmt *T) {
@@ -281,7 +282,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
   SourceRange getAngleBrackets() const LLVM_READONLY { return AngleBrackets; }
 
   static bool classof(const Stmt *T) {
@@ -513,7 +515,8 @@
     return getArg(0)->getLocStart();
   }
 
-  SourceLocation getLocEnd() const { return getRParenLoc(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const { return getRParenLoc(); }
 
   /// Returns the location of a ud-suffix in the expression.
   ///
@@ -548,7 +551,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   SourceLocation getLocation() const { return Loc; }
   void setLocation(SourceLocation L) { Loc = L; }
@@ -580,7 +584,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   SourceLocation getLocation() const { return Loc; }
   void setLocation(SourceLocation L) { Loc = L; }
@@ -621,7 +626,8 @@
     return SubExpr->getLocStart();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return SubExpr->getLocEnd();
   }
 
@@ -711,7 +717,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
   void setSourceRange(SourceRange R) { Range = R; }
 
@@ -775,7 +782,8 @@
         return MemberLoc;
   }
 
-  SourceLocation getLocEnd() const { return getMemberLoc(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const { return getMemberLoc(); }
 
   child_range children() {
     return child_range((Stmt**)&BaseExpr, (Stmt**)&BaseExpr + 1);
@@ -840,7 +848,8 @@
     return getBase()->getLocStart();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY { return RBracketLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RBracketLoc; }
 
   SourceLocation getRBracketLoc() const { return RBracketLoc; }
   void setRBracketLoc(SourceLocation L) { RBracketLoc = L; }
@@ -924,7 +933,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
   void setSourceRange(SourceRange R) { Range = R; }
 
@@ -974,7 +984,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   bool isImplicit() const { return Implicit; }
   void setImplicit(bool I) { Implicit = I; }
@@ -1031,7 +1042,8 @@
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return ThrowLoc; }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     if (!getSubExpr())
       return ThrowLoc;
     return getSubExpr()->getLocEnd();
@@ -1102,7 +1114,8 @@
   /// source, so they have an empty source range.
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
 
   SourceLocation getExprLoc() const LLVM_READONLY { return Loc; }
 
@@ -1163,7 +1176,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == CXXDefaultInitExprClass;
@@ -1240,7 +1254,8 @@
     return SubExpr->getLocStart();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY { return SubExpr->getLocEnd();}
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SubExpr->getLocEnd();}
 
   // Implement isa/cast/dyncast/etc.
   static bool classof(const Stmt *T) {
@@ -1395,7 +1410,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
   SourceRange getParenOrBraceRange() const { return ParenOrBraceRange; }
   void setParenOrBraceRange(SourceRange Range) { ParenOrBraceRange = Range; }
 
@@ -1468,7 +1484,8 @@
   SourceLocation getLocation() const LLVM_READONLY { return Loc; }
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == CXXInheritedCtorInitExprClass;
@@ -1527,7 +1544,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == CXXFunctionalCastExprClass;
@@ -1572,7 +1590,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == CXXTemporaryObjectExprClass;
@@ -1813,7 +1832,8 @@
     return IntroducerRange.getBegin();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY { return ClosingBrace; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return ClosingBrace; }
 
   child_range children() {
     // Includes initialization exprs plus body stmt
@@ -1850,7 +1870,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == CXXScalarValueInitExprClass;
@@ -2080,7 +2101,7 @@
   }
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
-  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == CXXNewExprClass;
@@ -2159,7 +2180,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY {return Argument->getLocEnd();}
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {return Argument->getLocEnd();}
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == CXXDeleteExprClass;
@@ -2346,7 +2368,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY {return Base->getLocStart();}
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == CXXPseudoDestructorExprClass;
@@ -2429,7 +2452,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == TypeTraitExprClass;
@@ -2491,7 +2515,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParen; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParen; }
 
   ArrayTypeTrait getTrait() const { return static_cast<ArrayTypeTrait>(ATT); }
 
@@ -2556,7 +2581,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParen; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParen; }
 
   ExpressionTrait getTrait() const { return static_cast<ExpressionTrait>(ET); }
 
@@ -2854,7 +2880,8 @@
     return getNameInfo().getLocStart();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     if (hasExplicitTemplateArgs())
       return getRAngleLoc();
     return getNameInfo().getLocEnd();
@@ -3005,7 +3032,8 @@
     return QualifierLoc.getBeginLoc();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     if (hasExplicitTemplateArgs())
       return getRAngleLoc();
     return getLocation();
@@ -3086,7 +3114,8 @@
     return SubExpr->getLocStart();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY { return SubExpr->getLocEnd();}
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SubExpr->getLocEnd();}
 
   // Implement isa/cast/dyncast/etc.
   static bool classof(const Stmt *T) {
@@ -3210,7 +3239,8 @@
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     if (!RParenLoc.isValid() && NumArgs > 0)
       return getArg(NumArgs - 1)->getLocEnd();
     return RParenLoc;
@@ -3439,7 +3469,8 @@
     return MemberNameInfo.getBeginLoc();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     if (hasExplicitTemplateArgs())
       return getRAngleLoc();
     return MemberNameInfo.getEndLoc();
@@ -3590,7 +3621,8 @@
     return getMemberNameInfo().getLocStart();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     if (hasExplicitTemplateArgs())
       return getRAngleLoc();
     return getMemberNameInfo().getLocEnd();
@@ -3657,7 +3689,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
 
   bool getValue() const { return Value; }
@@ -3739,7 +3772,8 @@
     return Pattern->getLocStart();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY { return EllipsisLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return EllipsisLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == PackExpansionExprClass;
@@ -3861,7 +3895,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return OperatorLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == SizeOfPackExprClass;
@@ -3906,7 +3941,8 @@
   SourceLocation getNameLoc() const { return NameLoc; }
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return NameLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return NameLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return NameLoc; }
 
   Expr *getReplacement() const { return cast<Expr>(Replacement); }
 
@@ -3971,7 +4007,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return NameLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return NameLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return NameLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == SubstNonTypeTemplateParmPackExprClass;
@@ -4045,7 +4082,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return NameLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return NameLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return NameLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == FunctionParmPackExprClass;
@@ -4161,7 +4199,8 @@
     return getTemporary()->getLocStart();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getTemporary()->getLocEnd();
   }
 
@@ -4237,7 +4276,8 @@
     return LParenLoc;
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return RParenLoc;
   }
 
@@ -4333,7 +4373,8 @@
     return KeywordLoc;
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getCommonExpr()->getLocEnd();
   }
 
@@ -4420,7 +4461,8 @@
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getOperand()->getLocEnd();
   }
 
Index: include/clang/AST/Expr.h
===================================================================
--- include/clang/AST/Expr.h
+++ include/clang/AST/Expr.h
@@ -908,7 +908,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return SourceExpr ? SourceExpr->getLocStart() : Loc;
   }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return SourceExpr ? SourceExpr->getLocEnd() : Loc;
   }
   SourceLocation getExprLoc() const LLVM_READONLY {
@@ -1067,7 +1068,8 @@
   void setLocation(SourceLocation L) { Loc = L; }
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   /// Determine whether this declaration reference was preceded by a
   /// C++ nested-name-specifier, e.g., \c N::foo.
@@ -1246,7 +1248,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == PredefinedExprClass;
@@ -1336,7 +1339,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   /// Retrieve the location of the literal.
   SourceLocation getLocation() const { return Loc; }
@@ -1376,7 +1380,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   /// \brief Retrieve the location of the literal.
   SourceLocation getLocation() const { return Loc; }
@@ -1431,7 +1436,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   unsigned getValue() const { return Value; }
 
@@ -1505,7 +1511,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Loc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == FloatingLiteralClass;
@@ -1543,7 +1550,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Val->getLocStart(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Val->getLocEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Val->getLocEnd(); }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == ImaginaryLiteralClass;
@@ -1718,7 +1726,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return TokLocs[0]; }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return TokLocs[NumConcatenated - 1];
   }
 
@@ -1759,7 +1768,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return L; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return R; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return R; }
 
   /// Get the location of the left parentheses '('.
   SourceLocation getLParen() const { return L; }
@@ -1886,7 +1896,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return isPostfix() ? Val->getLocStart() : Loc;
   }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return isPostfix() ? Loc : Val->getLocEnd();
   }
   SourceLocation getExprLoc() const LLVM_READONLY { return Loc; }
@@ -1993,7 +2004,8 @@
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
 };
 
 /// OffsetOfExpr - [C99 7.17] - This represents an expression of the form
@@ -2094,7 +2106,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return OperatorLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == OffsetOfExprClass;
@@ -2191,7 +2204,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return OpLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == UnaryExprOrTypeTraitExprClass;
@@ -2268,7 +2282,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return getLHS()->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RBracketLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RBracketLoc; }
 
   SourceLocation getRBracketLoc() const { return RBracketLoc; }
   void setRBracketLoc(SourceLocation L) { RBracketLoc = L; }
@@ -2437,7 +2452,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   /// Return true if this is a call to __assume() or __builtin_assume() with
   /// a non-value-dependent constant parameter evaluating as false.
@@ -2684,7 +2700,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   SourceLocation getExprLoc() const LLVM_READONLY { return MemberLoc; }
 
@@ -2782,7 +2799,8 @@
       return Init->getLocStart();
     return LParenLoc;
   }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     // FIXME: Init should never be null.
     if (!Init)
       return SourceLocation();
@@ -2961,7 +2979,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return getSubExpr()->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getSubExpr()->getLocEnd();
   }
 
@@ -3064,7 +3083,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return LPLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getSubExpr()->getLocEnd();
   }
 
@@ -3147,7 +3167,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return getLHS()->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getRHS()->getLocEnd();
   }
 
@@ -3431,7 +3452,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return getCond()->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getRHS()->getLocEnd();
   }
 
@@ -3520,7 +3542,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return getCommon()->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getFalseExpr()->getLocEnd();
   }
 
@@ -3577,7 +3600,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return AmpAmpLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return LabelLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return LabelLoc; }
 
   LabelDecl *getLabel() const { return Label; }
   void setLabel(LabelDecl *L) { Label = L; }
@@ -3623,7 +3647,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   SourceLocation getLParenLoc() const { return LParenLoc; }
   void setLParenLoc(SourceLocation L) { LParenLoc = L; }
@@ -3673,7 +3698,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == ShuffleVectorExprClass;
@@ -3758,7 +3784,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == ConvertVectorExprClass;
@@ -3840,7 +3867,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == ChooseExprClass;
@@ -3880,7 +3908,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return TokenLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return TokenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return TokenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == GNUNullExprClass;
@@ -3933,7 +3962,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == VAArgExprClass;
@@ -4168,7 +4198,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == InitListExprClass;
@@ -4409,7 +4440,8 @@
       else
         return getLBracketLoc();
     }
-    SourceLocation getLocEnd() const LLVM_READONLY {
+    SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
       return Kind == FieldDesignator ? getFieldLoc() : getRBracketLoc();
     }
     SourceRange getSourceRange() const LLVM_READONLY {
@@ -4494,7 +4526,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == DesignatedInitExprClass;
@@ -4537,7 +4570,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
 
   // Iterators
   child_range children() {
@@ -4573,7 +4607,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY;
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == DesignatedInitUpdateExprClass;
@@ -4651,7 +4686,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return getCommonExpr()->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getCommonExpr()->getLocEnd();
   }
 
@@ -4685,7 +4721,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
 
   child_range children() {
     return child_range(child_iterator(), child_iterator());
@@ -4722,7 +4759,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
 
   // Iterators
   child_range children() {
@@ -4768,7 +4806,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == ParenListExprClass;
@@ -4893,7 +4932,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return GenericLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == GenericSelectionExprClass;
@@ -4962,7 +5002,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return getBase()->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY { return AccessorLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return AccessorLoc; }
 
   /// isArrow - Return true if the base expression is a pointer to vector,
   /// return false if the base expression is a vector.
@@ -5006,7 +5047,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return getCaretLocation(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return getBody()->getLocEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return getBody()->getLocEnd(); }
 
   /// getFunctionType - Return the underlying function type for this block.
   const FunctionProtoType *getFunctionType() const;
@@ -5060,7 +5102,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == AsTypeExprClass;
@@ -5205,7 +5248,8 @@
   SourceLocation getBeginLoc() const LLVM_READONLY {
     return getSyntacticForm()->getLocStart();
   }
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getSyntacticForm()->getLocEnd();
   }
 
@@ -5331,7 +5375,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; }
-  SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == AtomicExprClass;
@@ -5386,7 +5431,8 @@
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return SourceLocation(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return SourceLocation(); }
 
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == TypoExprClass;
Index: include/clang/AST/DeclarationName.h
===================================================================
--- include/clang/AST/DeclarationName.h
+++ include/clang/AST/DeclarationName.h
@@ -557,17 +557,15 @@
   /// getBeginLoc - Retrieve the location of the first token.
   SourceLocation getBeginLoc() const { return NameLoc; }
 
-  /// getEndLoc - Retrieve the location of the last token.
-  SourceLocation getEndLoc() const { return getLocEnd(); }
-
   /// getSourceRange - The range of the declaration name.
   SourceRange getSourceRange() const LLVM_READONLY {
     return SourceRange(getLocStart(), getLocEnd());
   }
 
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
  
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     SourceLocation EndLoc = getEndLocPrivate();
     return EndLoc.isValid() ? EndLoc : getLocStart();
   }
Index: include/clang/AST/DeclObjC.h
===================================================================
--- include/clang/AST/DeclObjC.h
+++ include/clang/AST/DeclObjC.h
@@ -320,7 +320,8 @@
   // Location information, modeled after the Stmt API.
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return getLocation(); }
-  SourceLocation getLocEnd() const LLVM_READONLY;
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY;
   SourceRange getSourceRange() const override LLVM_READONLY {
     return SourceRange(getLocation(), getLocEnd());
   }
Index: include/clang/AST/DeclCXX.h
===================================================================
--- include/clang/AST/DeclCXX.h
+++ include/clang/AST/DeclCXX.h
@@ -235,7 +235,8 @@
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
   SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc();  }
   SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); }
-  SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); }
 
   /// Get the location at which the base class type was written.
   SourceLocation getBaseTypeLoc() const LLVM_READONLY {
@@ -2885,7 +2886,8 @@
     HasBraces = RBraceLoc.isValid();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     if (hasBraces())
       return getRBraceLoc();
     // No braces: get the end location of the (only) declaration in context
Index: include/clang/AST/DeclBase.h
===================================================================
--- include/clang/AST/DeclBase.h
+++ include/clang/AST/DeclBase.h
@@ -411,7 +411,8 @@
     return getSourceRange().getBegin();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return getSourceRange().getEnd();
   }
 
Index: include/clang/AST/Decl.h
===================================================================
--- include/clang/AST/Decl.h
+++ include/clang/AST/Decl.h
@@ -4226,7 +4226,8 @@
   SourceLocation getRBraceLoc() const { return RBraceLoc; }
   void setRBraceLoc(SourceLocation L) { RBraceLoc = L; }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     if (RBraceLoc.isValid())
       return RBraceLoc;
     // No braces: get the end location of the (only) declaration in context
Index: include/clang/AST/Comment.h
===================================================================
--- include/clang/AST/Comment.h
+++ include/clang/AST/Comment.h
@@ -220,7 +220,8 @@
     return Range.getBegin();
   }
 
-  SourceLocation getLocEnd() const LLVM_READONLY {
+  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc();  }
+  SourceLocation getEndLoc() const LLVM_READONLY {
     return Range.getEnd();
   }
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to