Another trivial getSpelling simplification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97327 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/PPExpressions.cpp b/lib/Lex/PPExpressions.cpp
index 6c92126..ede129e 100644
--- a/lib/Lex/PPExpressions.cpp
+++ b/lib/Lex/PPExpressions.cpp
@@ -170,10 +170,8 @@
     return true;
   case tok::numeric_constant: {
     llvm::SmallString<64> IntegerBuffer;
-    IntegerBuffer.resize(PeekTok.getLength());
-    const char *ThisTokBegin = &IntegerBuffer[0];
-    unsigned ActualLength = PP.getSpelling(PeekTok, ThisTokBegin);
-    NumericLiteralParser Literal(ThisTokBegin, ThisTokBegin+ActualLength,
+    llvm::StringRef Spelling = PP.getSpelling(PeekTok, IntegerBuffer);
+    NumericLiteralParser Literal(Spelling.begin(), Spelling.end(),
                                  PeekTok.getLocation(), PP);
     if (Literal.hadError)
       return true; // a diagnostic was already reported.