Hello, Nick!<br><br>Thank you for your reply.<br><br>Regarding to pointers to functions: look at this code:<br><br><span style="font-family:courier new,monospace">static void _some_func(int a, int b, int c)<br>{<br>   //-- do something<br>

}<br><br>typedef void (*T_pMyFunc) (int a, int b, int c);<br><br>typedef struct {<br>   T_pMyFunc p_my_func;<br>} T_MyStruct;<br><br>int main(void)<br>{<br>   T_MyStruct my_struct = {<br>      .p_my_func = _some_func,<br>

   };<br><br>   _some_func/*cursor is here. I see function signature: int a, int b, int c. Everything is great*/<br><br>   my_struct./*cursor is here. I see only member T_pMyFunc p_my_func, but there's no function signature. There would be even greater if clang could handle this*/<br>

<br>}<br></span><br>Hope I explained this clear.<br><br>As to second one (completion inside structure initializer), thanks for the suggestion, I filed it as you suggested: <a href="http://goo.gl/wYP0z">http://llvm.org/bugs/show_bug.cgi?id=14446</a><br>

<br>--<br>Regards,<br>Dmitry<br><div class="gmail_extra"><br><br><div class="gmail_quote">2012/11/28 Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

[bcc llvm-dev, +cfe-dev]<div class="im"><br>
<br>
Dmitry Frank wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear developers,<br>
<br>
First of all, thank you for your job on clang, now I use clang as<br>
autocompletion tool with my Vim, and it seems to work awesome. But I<br>
have some questions:<br>
<br>
  1) Is it possible to make clang to complete pointers to functions as a<br>
functions? I mean, I want to get function prototype, with returning<br>
value type and all the parameters.<br>
</blockquote>
<br></div>
Clang certainly knows all the relevant information, but it's not clear how this would work in code completion. What do you expect to have in the buffer, and where would the cursor be for clang to complete?<br>
<br>
You'll need to have already typed something that makes it clear that the next thing clang ought to do is complete the type of function prototype. Usually completion looks forwards, and wouldn't you have already needed to type the return type to get to the function name? Maybe I'm just failing to visualize what we're doing here.<div class="im">

<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2) Is it possible to make completion work inside structure initializers?<br>
I mean, like that:<br>
<br>
typedef  struct  {<br>
    int  a;<br>
    int  b;<br>
} T_MyStruct;<br>
<br>
int  main(void)<br>
{<br>
    T_MyStruct my_struct = {<br>
       .a =0,<br>
       ./*cursor is here. I want to get list of struct members: [a, b]*/<br>
    };<br>
}<br>
</blockquote>
<br></div>
This sounds like a great missing-feature bug report. Please file it at <a href="http://llvm.org/bugs" target="_blank">llvm.org/bugs</a> !<span class="HOEnZb"><font color="#888888"><br>
<br>
Nick<br>
</font></span></blockquote></div><br></div>