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

Douglas Gregor dgregor at apple.com
Tue Nov 6 22:26:14 PST 2012


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




More information about the cfe-commits mailing list