diff --git a/clang/Driver/PrintPreprocessedOutput.cpp b/clang/Driver/PrintPreprocessedOutput.cpp index 0a3e46f6609e..9968d515cee6 100644 --- a/clang/Driver/PrintPreprocessedOutput.cpp +++ b/clang/Driver/PrintPreprocessedOutput.cpp @@ -299,9 +299,7 @@ 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) { - const char *TokPtr = Buffer; - unsigned Len = PP.getSpelling(Tok, TokPtr); - FirstChar = TokPtr[0]; + FirstChar = Buffer[0]; } else { FirstChar = PP.getSpelling(Tok)[0]; }