Cedet multiple indirection to definition via typedef results in no completion

62 views Asked by At

Pretend I have an emacs window open and it is split horizontally into three buffers:

===== BUFFER1.cpp ======
#include "CommonTypeDefs.h"
namespace NS1 {
...
void someFunction( void ) {
  MyClassHandle mh = getMyClassHandle(); // getMyClassHandle(): returns a MyClassHandle
  mh-> // SEMANTIC does not parse
...

-

===== CommonTypeDefs.h   ======

...
typedef class NS2::MyClass* MyClassHandle
...

-

===== BUFFER2.h   ======

namespace NS2 {
...
class MyClass {
  // things in here
...

-

I do not see why this extra layer (in this case a common header file full of typedefs) is not picking up the possible completions.

-

I have also noticed that when Semantic works I get shown the line of the class definition, eg:

-

===== BUFFER1.h   ======

SomeDe[]finedClass* sdc = getSomeDefinedClassPtr();

-

If I have the cursor over the type that is sdc (see the square braces), the Emacs minibuffer will say something

like:

-

SomeDefinedClass.h: class SomeDefinedClass {}

-

This means that I know Semantic will be able to parse the symbos in SomeDefinedClass. Everything is good when this happens because there is no typedef involved. But, in the case where things don't work:

-

===== BUFFER1.h   ======

SomeDe[]finedClassHandle sdch = getSomeDefinedClassHandle();

-

Again, I have the cursor where the square brackets are but this time the minibuffer says:

-

CommonTypeDefs.h: typedef* SomeDefinedClassHandle {}

-

I guess this makes sense, because firstly this type is a typedef, but it seems like Semantic stops there - rather than then saying, Okay: I am a typedef, but now I need to look at symbols for the typedef. Hence, I do not get completions.

-

I have confirmed that everything has been parsed because I have -decoration-mode on. Also, semantic is working for other things, it just doesn't seem to be able to handle these handles.

There is no problem with missing includes either as there are no compilation errors. In this project there are a number of subsystems, hence why I have included different directory to the system-c-dependency-include* path and these all work fine.

Why is this not working?

Emacs 24.3 / Windows / CEDET (around the 26th Sept 2014 bzr release)

0

There are 0 answers