Fix regression in my last commit

llvm-svn: 39013
This commit is contained in:
Chris Lattner 2006-10-18 06:06:41 +00:00
parent 59a9ebdb17
commit 9f547a4fdd
1 changed files with 3 additions and 1 deletions

View File

@ -299,7 +299,9 @@ static bool AvoidConcat(const LexerToken &PrevTok, const LexerToken &Tok,
// Avoid spelling identifiers, the most common form of token.
FirstChar = II->getName()[0];
} else if (Tok.getLength() < 256) {
FirstChar = Buffer[0];
const char *TokPtr = Buffer;
PP.getSpelling(Tok, TokPtr);
FirstChar = TokPtr[0];
} else {
FirstChar = PP.getSpelling(Tok)[0];
}