[cfe-dev] [RFC] Captured Statements

Argyrios Kyrtzidis akyrtzi at gmail.com
Wed Jan 30 15:33:59 PST 2013


On Jan 30, 2013, at 1:46 PM, Sean Silva <silvas at purdue.edu> wrote:

> On Wed, Jan 30, 2013 at 4:35 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>> +  CXCursor_LastStmt                      = CXCursor_ExampleCapturedStmt,

Could we not add that ? We should try to avoid exposing internal AST nodes via libclang's interface unless there is a compelling reason to do so.

>> 
>> Please bump CINDEX_VERSION_MINOR.
> 
> This would violate minor version semantics (at least for most
> versioning schemes; idk which one we officially use). This change is
> not backwards compatible e.g. if a header declares
> 
> extern int arr[CXCursor_LastStmt];
> 
> then code compiled against this version will read off the end of the
> array which was compiled with a previous minor version.

The presence of CXCursor_Last* enumerators is unfortunate; IMO it'd be better if they were not exposed for the reasons Sean mentioned.
That said, they have been there forever, without version numbers, and it did not stop us from adding more enumerators.

I'd suggest that we document that these are likely to change between minor versions and avoid using them as much as possible.

> 
> -- Sean Silva
> _______________________________________________
> 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