Use v.data() instead of &v[0] when SmallVector v might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index db24d21..4c2a77e 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -377,7 +377,7 @@
              "Unexpected number of commas!");
       Actions.AddCXXDirectInitializerToDecl(ThisDecl, LParenLoc,
                                             move_arg(Exprs),
-                                            &CommaLocs[0], RParenLoc);
+                                            CommaLocs.data(), RParenLoc);
     }
   } else {
     Actions.ActOnUninitializedDecl(ThisDecl);
@@ -438,7 +438,7 @@
     ParseDeclarator(D);
   }
   
-  return Actions.FinalizeDeclaratorGroup(CurScope, &DeclsInGroup[0],
+  return Actions.FinalizeDeclaratorGroup(CurScope, DeclsInGroup.data(),
                                          DeclsInGroup.size());
 }
 
@@ -1387,7 +1387,7 @@
     AttrList = ParseAttributes();
 
   Actions.ActOnFields(CurScope,
-                      RecordLoc,TagDecl,&FieldDecls[0],FieldDecls.size(),
+                      RecordLoc, TagDecl, FieldDecls.data(), FieldDecls.size(),
                       LBraceLoc, RBraceLoc,
                       AttrList);
   StructScope.Exit();
@@ -1537,7 +1537,7 @@
   SourceLocation RBraceLoc = MatchRHSPunctuation(tok::r_brace, LBraceLoc);
 
   Actions.ActOnEnumBody(StartLoc, LBraceLoc, RBraceLoc, EnumDecl,
-                        &EnumConstantDecls[0], EnumConstantDecls.size());
+                        EnumConstantDecls.data(), EnumConstantDecls.size());
   
   Action::AttrTy *AttrList = 0;
   // If attributes exist after the identifier list, parse them.
@@ -2462,7 +2462,7 @@
   // Remember that we parsed a function type, and remember the attributes.
   D.AddTypeInfo(DeclaratorChunk::getFunction(/*proto*/true, IsVariadic,
                                              EllipsisLoc,
-                                             &ParamInfo[0], ParamInfo.size(),
+                                             ParamInfo.data(), ParamInfo.size(),
                                              DS.getTypeQualifiers(),
                                              hasExceptionSpec,
                                              hasAnyExceptionSpec,