Another trivial getSpelling simplification.
llvm-svn: 97327
This commit is contained in:
parent
d46ed89d79
commit
53fa347ee6
|
@ -170,10 +170,8 @@ static bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT,
|
||||||
return true;
|
return true;
|
||||||
case tok::numeric_constant: {
|
case tok::numeric_constant: {
|
||||||
llvm::SmallString<64> IntegerBuffer;
|
llvm::SmallString<64> IntegerBuffer;
|
||||||
IntegerBuffer.resize(PeekTok.getLength());
|
llvm::StringRef Spelling = PP.getSpelling(PeekTok, IntegerBuffer);
|
||||||
const char *ThisTokBegin = &IntegerBuffer[0];
|
NumericLiteralParser Literal(Spelling.begin(), Spelling.end(),
|
||||||
unsigned ActualLength = PP.getSpelling(PeekTok, ThisTokBegin);
|
|
||||||
NumericLiteralParser Literal(ThisTokBegin, ThisTokBegin+ActualLength,
|
|
||||||
PeekTok.getLocation(), PP);
|
PeekTok.getLocation(), PP);
|
||||||
if (Literal.hadError)
|
if (Literal.hadError)
|
||||||
return true; // a diagnostic was already reported.
|
return true; // a diagnostic was already reported.
|
||||||
|
|
Loading…
Reference in New Issue