[cfe-commits] r49874 - /cfe/trunk/Driver/HTMLPrint.cpp

Chris Lattner sabre at nondot.org
Thu Apr 17 15:25:16 PDT 2008


Author: lattner
Date: Thu Apr 17 17:24:51 2008
New Revision: 49874

URL: http://llvm.org/viewvc/llvm-project?rev=49874&view=rev
Log:
Handle text escaping (e.g. & -> &) last, to avoid interactions between 'replace' operations and insert operations.  This fixes a problem with "&;&" on line 666 of the gcc.c example I sent out.

Modified:
    cfe/trunk/Driver/HTMLPrint.cpp

Modified: cfe/trunk/Driver/HTMLPrint.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/HTMLPrint.cpp?rev=49874&r1=49873&r2=49874&view=diff

==============================================================================
--- cfe/trunk/Driver/HTMLPrint.cpp (original)
+++ cfe/trunk/Driver/HTMLPrint.cpp Thu Apr 17 17:24:51 2008
@@ -55,7 +55,6 @@
 
   // Format the file.
   unsigned FileID = R.getSourceMgr().getMainFileID();
-  html::EscapeText(R, FileID, false, true);
   html::AddLineNumbers(R, FileID);
   html::AddHeaderFooterInternalBuiltinCSS(R, FileID);
 
@@ -67,6 +66,7 @@
     html::SyntaxHighlight(R, FileID, *PP);
     html::HighlightMacros(R, FileID, *PP);
   }
+  html::EscapeText(R, FileID, false, true);
   
   
   // Open the output.





More information about the cfe-commits mailing list