[cfe-commits] [Patch] Add a function to libclang for retrieving the bit width value

Jyun-Yan You jyyou.tw at gmail.com
Wed Nov 7 00:48:00 PST 2012


On Wed, Nov 7, 2012 at 2:26 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
> On Nov 6, 2012, at 4:41 PM, Jyun-Yan You <jyyou.tw at gmail.com> wrote:
>
>> On Mon, Oct 22, 2012 at 1:15 PM, Jyun-Yan You <jyyou.tw at gmail.com> wrote:
>>> On Mon, Oct 22, 2012 at 1:12 PM, Jyun-Yan You <jyyou.tw at gmail.com> wrote:
>>>> Hi
>>>>
>>>> I use libclang to translate C headers into rust language,
>>>> however, libclang does not provide any function to get the bit width
>>>> of a field declaration.
>>>> In order to translate headers correctly, I write
>>>> clang_getFieldDeclBitWidth function to retrieve the value.
>>>> Could it be merged into trunk?
>>>
>>> Sorry, I forgot to attach to patch.
>>
>> Can someone review and merge this patch?
>
> The patch looks good, but can you please add a test? For example, update c-index-test to print out the bit width, and update one of the tests in test/Index.
>
>         - Doug
>

Here is a new patch which contains a test.
Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitfield2.patch
Type: application/octet-stream
Size: 4731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121107/4a6cd466/attachment.obj>


More information about the cfe-commits mailing list