<font size=2 face="sans-serif">We are using Clang as our compiler, and
I want to display prototype tooltips in the IDE. I'm using libclang to
get various source code browsing information.</font>
<br>
<br><font size=2 face="sans-serif">In order to get the prototype information,
I create the translation unit with clang_createTranslationUnit. Then I
traverse the translation unit with clang_visitChildren. Whenever I come
upon a cursor of kind CXCursor_FunctionDecl, I remember the cursor and
then add any cursors of kind CXCursor_ParmDecl that follow to a parameter
list. Then when I want to display the function prototype, I go thru the
parameter cursor list, getting each parameter's type and name.</font>
<br>
<br><font size=2 face="sans-serif">This seems to work fine, except for
variable argument functions. For example, for the function</font>
<br>
<br><font size=2 face="sans-serif">void VarArgFunc(int p1, ...)</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif">        va_list
       parmInfo;</font>
<br><font size=2 face="sans-serif">        va_start(parmInfo,
p1);</font>
<br><font size=2 face="sans-serif">        va_end(parmInfo);</font>
<br><font size=2 face="sans-serif">}</font>
<br>
<br><font size=2 face="sans-serif">when traversing the translation unit
with clang_visitChildren, the CXCursorVisitor callback is not called for
the '...' variable argument parameter. This means that I can't tell that
the function has a variable argument parameter, and when I show the prototype
tooltip, it just shows "void VarArgFunc(int p1)".</font>
<br>
<br><font size=2 face="sans-serif">How can I detect that the function has
a variable argument parameter? Is there some other better way to get this
information?</font>
<br>
<br><font size=2 face="sans-serif">Thanks</font>