<br><br><div class="gmail_quote">Le 17 mars 2012 17:39, Mickaël Guérin <span dir="ltr"><<a href="mailto:kael@crocobox.org">kael@crocobox.org</a>></span> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Le 16 mars 2012 à 22:02, Ted Kremenek a écrit :<br>
<br>
> The solution is to fix libclang to expose the type.  Please either file a PR requesting this or to supply a patch.  Thanks!<br>
<br>
<br><br>
<br>
Here is a patch :)<br>
<br>
clang_getNumElements and clang_getArraySize return -1 for incomplete arrays, I don't know whether it's good or not.<br>
(-1 or 0 seem to be two possible choices)<br>
<br>
--<br>
Mickaël.<br><br></blockquote><div>-1 seems better to me as arrays of size explicitly set to 0 are possible (and were indeed used prior to the introduction of flexible arrays), so -1 gives the opportunity to distinguish between `[]` and `[0]`.</div>
<div><br></div><div>-- Matthieu</div></div><br>