Consider this source fragment:
class Z
{
public:
Z(int){}
void foo() {}
};
This works as intended:
int main()
{
Z a(1);
a. // <- at this point, a list of functions appears in a menu
This does not work at all:
Z b // <- at this point, nothing happens if I press <Tab> or C-X C-U
// except a "pattern not found" message
Z b( // <- same here
But this does:
Z b = Z // a list of constructors appears in a menu when <Tab> is pressed
Is it possible to set up clang_complete such that the constructor completion works in both cases?
This is clang
(and libclang
) issue, not Vim's plugin clang_complete
issue.
clang
is now in active development stage AFAIK, so, you can file bug-report at http://llvm.org/bugs . But, I myself filed several bugs related to code completion more than a month ago (e.g. this one) but they are still unresolved.
When I need to get available constructors list, I write code like yours Z b = Z
, select constructor, and then convert Z b = Z
to something I really need. Not very good, but better than nothing.