[AST/Sema/libclang] Replace getSourceRange().getBegin() with getLocStart().
 - getSourceRange().getBegin() is about as awesome a pattern as .copy().size().

I already killed the hot paths so this doesn't seem to impact performance on my
tests-of-the-day, but it is a much more sensible (and shorter) pattern.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152419 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 7e4a1ed..a91146c 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -3702,7 +3702,7 @@
                                             TSInfo->getTypeLoc().getBeginLoc());
       
       return cxloc::translateSourceLocation(getCursorContext(C),
-                                        BaseSpec->getSourceRange().getBegin());
+                                        BaseSpec->getLocStart());
     }
 
     case CXCursor_LabelRef: {
@@ -3908,10 +3908,10 @@
     SourceLocation StartLoc;
     if (const DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(D)) {
       if (TypeSourceInfo *TI = DD->getTypeSourceInfo())
-        StartLoc = TI->getTypeLoc().getSourceRange().getBegin();
+        StartLoc = TI->getTypeLoc().getLocStart();
     } else if (TypedefDecl *Typedef = dyn_cast<TypedefDecl>(D)) {
       if (TypeSourceInfo *TI = Typedef->getTypeSourceInfo())
-        StartLoc = TI->getTypeLoc().getSourceRange().getBegin();
+        StartLoc = TI->getTypeLoc().getLocStart();
     }
 
     if (StartLoc.isValid() && R.getBegin().isValid() &&
@@ -4845,10 +4845,10 @@
     SourceLocation StartLoc;
     if (const DeclaratorDecl *DD = dyn_cast_or_null<DeclaratorDecl>(D)) {
       if (TypeSourceInfo *TI = DD->getTypeSourceInfo())
-        StartLoc = TI->getTypeLoc().getSourceRange().getBegin();
+        StartLoc = TI->getTypeLoc().getLocStart();
     } else if (TypedefDecl *Typedef = dyn_cast_or_null<TypedefDecl>(D)) {
       if (TypeSourceInfo *TI = Typedef->getTypeSourceInfo())
-        StartLoc = TI->getTypeLoc().getSourceRange().getBegin();
+        StartLoc = TI->getTypeLoc().getLocStart();
     }
 
     if (StartLoc.isValid() && L.isValid() &&