Add getTypeSpecStartLoc() to VarDecls and FunctionDecls.

This is a temporary solution to help with the block rewriter (though it certainly has general utility).
Once DeclGroup's are implemented, this SourceLocation should be stored with it (since it applies to all the decls).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56985 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 8214fe4..1d755ef 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -661,8 +661,9 @@
     } else {
       NewFD = FunctionDecl::Create(Context, CurContext,
                                    D.getIdentifierLoc(),
-                                   II, R, SC, isInline,
-                                   LastDeclarator);
+                                   II, R, SC, isInline, LastDeclarator,
+                                   // FIXME: Move to DeclGroup...
+                                   D.getDeclSpec().getSourceRange().getBegin());
     }
     // Handle attributes.
     ProcessDeclAttributes(NewFD, D);
@@ -766,7 +767,9 @@
         }
       }
         NewVD = VarDecl::Create(Context, CurContext, D.getIdentifierLoc(), 
-                                II, R, SC, LastDeclarator);
+                                II, R, SC, LastDeclarator,
+                                // FIXME: Move to DeclGroup...
+                                D.getDeclSpec().getSourceRange().getBegin());
         NewVD->setThreadSpecified(ThreadSpecified);
     }
     // Handle attributes prior to checking for duplicates in MergeVarDecl