Golevka / emacs-clang-complete-async

An emacs plugin to complete C and C++ code using libclang
359 stars 71 forks source link

Completing a type which has a constructor results in the constructor, not the type. #44

Open toojays opened 11 years ago

toojays commented 11 years ago

Consider the following code:

class MyClass
{
  MyClass();
};

int main (void)
{
  M|
}

Where the | represents the cursor position. I would like to complete the type name MyClass. However, when I press TAB (or RET) here, it completes to MyClass()

The completion I want is being passed back from the async process, because the clang-complete buffer includes:

COMPLETION: MyClass
COMPLETION: MyClass : MyClass()

So something in the elisp is causing the completion of the type to be ignored, but only when there is a constructor. If I don't declare the constructor in my example above, I can complete MyClass.