Patch by Stefan Bühler: Escape text in macro expansion when emitting HTML in the HTMLRewriter.

This fixes PR 4602.

llvm-svn: 76647
This commit is contained in:
Ted Kremenek 2009-07-21 21:16:46 +00:00
parent 1eede6c635
commit 6dec002981
1 changed files with 1 additions and 1 deletions

View File

@ -519,7 +519,7 @@ void html::HighlightMacros(Rewriter &R, FileID FID, Preprocessor& PP) {
assert(SM.getFileID(LLoc.second) == FID &&
"Start and end of expansion must be in the same ultimate file!");
std::string Expansion = PP.getSpelling(Tok);
std::string Expansion = EscapeText(PP.getSpelling(Tok));
unsigned LineLen = Expansion.size();
Token PrevTok = Tok;