[cfe-commits] r76647 - /cfe/trunk/lib/Rewrite/HTMLRewrite.cpp
Ted Kremenek
kremenek at apple.com
Tue Jul 21 14:16:46 PDT 2009
Author: kremenek
Date: Tue Jul 21 16:16:46 2009
New Revision: 76647
URL: http://llvm.org/viewvc/llvm-project?rev=76647&view=rev
Log:
Patch by Stefan Bühler: Escape text in macro expansion when emitting HTML in the HTMLRewriter.
This fixes PR 4602.
Modified:
cfe/trunk/lib/Rewrite/HTMLRewrite.cpp
Modified: cfe/trunk/lib/Rewrite/HTMLRewrite.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/HTMLRewrite.cpp?rev=76647&r1=76646&r2=76647&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/HTMLRewrite.cpp (original)
+++ cfe/trunk/lib/Rewrite/HTMLRewrite.cpp Tue Jul 21 16:16:46 2009
@@ -519,7 +519,7 @@
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;
More information about the cfe-commits
mailing list