[cfe-commits] libclang: Patch to expose array size and element type

Argyrios Kyrtzidis kyrtzidis at apple.com
Tue Sep 27 13:11:15 PDT 2011


On Sep 27, 2011, at 12:08 PM, Vinay Sajip wrote:

>> From: Argyrios Kyrtzidis <kyrtzidis at apple.com>
> 
>> 
>> In r140614, thanks!
>> 
> 
> 
> Thanks very much. Actually, I had an additional use case I came across: I want to get the element type for incomplete arrays, too, and also for complex types. Possibly the clang_getArrayElementType() function could be just renamed to clang_getElementType(), where it could serve to return also the element type for Complex as well as the array types. Alternatively, we could leave the Array one as is and add an explicit clang_getComplexElementType().

clang_getElementType() sounds good.

> 
> 
> BTW my separate patch relating to cursor values needs some changes - I need to mask the returned value depending on the bitwidth of the enumeration type. I'm working on it at
> 
> https://github.com/vsajip/clang/commit/0c5d82624cbfa58a24e2eb7f3c4a644da6cfc449

Isn't APSInt::extOrTrunc applicable ?

> 
> where I've also renamed the function to clang_getConstantIntegerValue.
> 
> 
> Regards,
> 
> Vinay Sajip




More information about the cfe-commits mailing list