[cfe-dev] c99 flexible array & libclang

Mickaël Guérin kael at crocobox.org
Sat Mar 17 09:39:21 PDT 2012


Le 16 mars 2012 à 22:02, Ted Kremenek a écrit :

> The solution is to fix libclang to expose the type.  Please either file a PR requesting this or to supply a patch.  Thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: incompletearray.diff
Type: application/octet-stream
Size: 2953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120317/85b0a511/attachment.obj>
-------------- next part --------------


Here is a patch :)

clang_getNumElements and clang_getArraySize return -1 for incomplete arrays, I don't know whether it's good or not.
(-1 or 0 seem to be two possible choices)

--  
Mickaël.


More information about the cfe-dev mailing list