[cfe-dev] llibclang CXTypeKind 'char' types

Eli Friedman eli.friedman at gmail.com
Fri Feb 17 11:40:42 PST 2012


On Fri, Feb 17, 2012 at 9:33 AM, Phil King <phil_king at rocketmail.com> wrote:
> Looking in the libclang Index.h file I can see there are various enums related
> to 'char' types. Is the following interpretation of these correct?
>
> 1) CXType_Char_U and CXType_Char_S relate to the implemented type of character data (e.g. if 'char' is signed or unsigned);
> 2) CXType_UChar and CXType_SChar are for explicitly signed / unsigned 'char's;

Correct.

> 3) CXType_WChar is wchar_t;

Correct, but note that this only shows up in C++; wchar_t is a typedef in C.

> 4) CXType_Char16 and CXType_Char32. Not too sure about these - when 'char' is implemented with 16/32 signed representation? If so, does CXType_Char_U / S imply 8 bit or implemented width?

As Sebastian notes, these are C++11 char16_t and char32_t.

-Eli



More information about the cfe-dev mailing list