[cfe-dev] [PATCH] C++0x unicode string and character literals now with test cases

Craig Topper craig.topper at gmail.com
Wed Jul 20 00:27:25 PDT 2011


Reverted TokenConcatenation::IsIdentifierL and added a new method
specifically for detecting identifiers of "u8", "u", or "U". This new
method is qualified with CPlusPlus0x check so that we won't avoid the
concat when Unicode string literals aren't supported. Used a separate
method just to make it cleaner than scattering C++0x checks throughout
the method.

On Tue, Jul 19, 2011 at 12:08 AM, Craig Topper <craig.topper at gmail.com> wrote:
> Here's a new patch that fixes the line lengths. Also widens to the
> token kind in the Identifier table because 8-bits wasn't enough
> anymore so kw_unknown_anytype was being truncated from 256 to 0.
>
> On Mon, Jul 18, 2011 at 7:13 PM, Craig Topper <craig.topper at gmail.com> wrote:
>> On Mon, Jul 18, 2011 at 1:16 PM, Eric Christopher <echristo at apple.com> wrote:
>>>
>>> On Jul 18, 2011, at 11:50 AM, Craig Topper wrote:
>>>
>>>> Thanks for the review! I'll fix the line lengths tonight. Do you know
>>>> who is more familiar with the code?
>>>
>>> Chris or Doug would be the two people most likely to approve it.
>>>
>>> Had a couple of thoughts that I figured I'd ask about:
>>>
>>> a) the enum for character and string is almost identical, any reason
>>> not to make them identical
>>
>> I mainly didn't make them identical cause I put them inside the
>> CharacterLiteral and StringLiteral classes. Wasn't sure were an
>> appropriate home would be if they were shared.
>>
>>>
>>> b) any reason not to have the string literal creation machinery just
>>> default to ascii and not need the changes in most of the use cases?
>>
>> I don't follow.
>>
>>>
>>> -eric
>>>
>>
>>
>>
>> --
>> ~Craig
>>
>
>
>
> --
> ~Craig
>



-- 
~Craig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unicode_strings.patch
Type: application/octet-stream
Size: 79325 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110720/29878d3b/attachment.obj>


More information about the cfe-dev mailing list