[cfe-dev] [patch] Support for C++0x raw string literals

Douglas Gregor dgregor at apple.com
Tue Aug 9 07:31:30 PDT 2011


Hi Craig,

On Aug 9, 2011, at 12:07 AM, Craig Topper wrote:

> Here's my new and improved patch. Changes from previous version:
> 
> Fix up the error messages to give example delimiter. Added ending
> delimiter to the unterminated message.
> Fixed the lexing to not do phase 1 and phase 2 conversions per
> lex.pptoken paragraph 3.
> Use CharInfo array to simplify detection of valid delimiter characters.
> On errors, lex forward to the next quote character hoping to get the
> lexer back on track.
> Factored out duplicate code from IsIdentifierStringPrefix and better
> commented exactly what the checks were doing.
> Fixed the comment block above StringLiteralParser to include unicode
> and raw string literals. Added similar block above CharLiteralParser.
> Factored out the code that copies characters into ResultBuf in
> StringLiteralParser to better separate raw and non-raw string
> handling.

This looks great to me. Give Chris Lattner a day to look over this and comment, and assuming no other issues come to light, please go ahead and commit tomorrow with one tiny typo fix:

@@ -1062,6 +1117,26 @@
 }
 
 
+/// copyStringFragment - This function copies from Start to End into ResultPtr.
+/// Peforms widening for multi-byte characters.

Typo "peforms" here.

FWIW, please send future patches to cfe-commits. Thanks!

	- Doug



More information about the cfe-dev mailing list