> I came across a similar observation in libc++ when this attribute is used for
a vararg function: GCC produces an error, Clang was silent.If Clang ignores this
attribute, it should at least say so with a warning. This can be a general:
Warning: ignored unknown attribute attribute.Ruben
Looking into it further, I see it isn't ignored - just not exposed via libclang.
Neither, AFAICT, is the storage class for declarations :-(
> Neither, AFAICT, is the storage class for declarations :-(
This is on my to-do list to fix. I recently had to write a little tool using libclang that checked that a set of functions didn't reference any statics or globals. Globals are easy, because their linkage class is exposed. Unfortunately, both static locals and variables with automatic storage have no linkage type. The only way I found of detecting the statics was to go back to the declaration and check if any of the keyword tokens was 'static'. This was an ugly hack to make it work - I hope to get around to exposing sane APIs in libclang for doing it properly before 3.0.