[cfe-commits] [cfe-dev] CharacterLiteral - is this a multi-character value?

Seth Cantrell seth.cantrell at gmail.com
Sun Feb 26 15:54:28 PST 2012


This information isn't currently maintained in the CharLiteral. We use it only in the CharLiteralParser and in ActOnCharacterConstant in order to determine the type and integral value of a character literal. After the CharLiteral's value and type are set we no longer need to know if the literal is a multi-char or not.

I'm not sure whether it would be appropriate or not to add this information to CharLiteral.

If you can get the token location of the character literal perhaps you can reparse it or something, if nothing else. 



On Feb 26, 2012, at 5:05 PM, Phil King wrote:

> How can I find out if a CharacterLiteral represents a multi-character value?
> 
> I see that CharLiteralParser::isMultiChar() can give this, but I can't see a way to get there from a CharacterLiteral.
> 
>  
> Phil.
> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev





More information about the cfe-commits mailing list