[PATCH] [libclang] getSizeOf/getAlignOf/getOffsetOf (was [PATCH] Expose AST Record layout attributes to libclang)
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Mar 29 15:20:50 PDT 2013
On Mar 29, 2013, at 9:30 AM, Loïc Jaquemet <loic.jaquemet at gmail.com> wrote:
> any comments ?
I'll review it soon(ish).
>
> 2013/3/25 Loïc Jaquemet <loic.jaquemet at gmail.com>:
>>>> Does this handle anonymous structs/unions ? For example:
>>>>
>>>> struct Test {
>>>> struct {
>>>> union {
>>>> int foo;
>>>> };
>>>> };
>>>> };
>>>>
>>>> If I pass "struct Test", "foo" will it work ? If yes, could you add a
>>>> related test ?
>>>>
>>>
>>> It does not work.
>>> I will look into that.
>>
>> And now it does handle anonymous records.
>> I added some tests cases and changed the unit test code.
>>
>> I also removed the duplicate clang_Cursor_getOffsetOf().
>> After consideration, it did not make sense, especially in the
>> anonymous record situation.
>>
>> Please see attached diffs.
>>
>> * Implementation of sizeof, alignof and offsetof for libclang.
>> * Unit Tests
>> * Python bindings
>> * Python tests
>>
>>
>>
>>
>>
>> --
>> Loïc Jaquemet
>
>
>
> --
> Loïc Jaquemet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130329/1b6fb771/attachment.html>
More information about the cfe-commits
mailing list