[cfe-dev] [PATCH/RFC] Expose OpenCL Attributes in libclang

Paul Fox fox at emphotonics.com
Fri Jun 27 09:19:00 PDT 2014


I agree regarding auto-generation; there's a lot of boilerplate here 
that could be auto-generated. Some things will probably need to be 
manually specified for the sake of API stability (such as enums for 
attributes and such, which need to be stable while the AST can change), 
but hopefully in only one place.

I think, however, that some bits of the interface will need re-thinking 
(especially as regards type attributes, which are currently exposed in a 
one-off way).

I would like to be able to use libclang for some basic semantic analysis 
for development tools, but right now there are several features lacking 
on that front.

-Paul Fox

On 06/27/2014 12:05 PM, Aaron Ballman wrote:
> LGTM, but this demonstrates the need for this to be automated more. At
> some point, I think this should be automatically generated from
> Attr.td instead of requiring manual intervention.
>
> ~Aaron
>
> On Wed, Jun 25, 2014 at 4:19 PM, Paul Fox <fox at emphotonics.com> wrote:
>> Here are initial patches that expose the inheritable attributes for OpenCL
>> in libclang, including the python bindings.
>>
>> As far as I can tell, since the address space attributes are type
>> attributes, exposing them will require adding to the libclang API (which
>> does not appear to have any generalized way to query type attributes at the
>> moment). Any suggestions for this?
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>




More information about the cfe-dev mailing list