[cfe-dev] inline directive apparently ignored

David Chisnall theraven at sucs.org
Sun Sep 25 02:24:53 PDT 2011


On 25 Sep 2011, at 09:42, Vinay Sajip wrote:

> 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.

David

-- Sent from my STANTEC-ZEBRA





More information about the cfe-dev mailing list