emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs 24 semantic C++ completion problem


From: Vyacheslav Gonakhchyan
Subject: Re: Emacs 24 semantic C++ completion problem
Date: Fri, 30 Dec 2011 15:00:17 +0000

>Could you please provide an example, showing what you're trying to
>complete and what member functions you would expect to appear?
Attached zip file with project. There are two markers in code(Tut.cpp): ERR1, ERR2.
ERR1: many incorrect completion variants(it dumps constants, headers etc from many places - it results in 58KB file).
ERR2: error on completion(error 2 from my first message).
Unfortunately to reproduce ERR1 you should have Ogre installed.
ERR2 should be possible to reproduce on project code.

I also tried another simple project setup with vector class from stl. Completion variants were correct there.
That leads me to beleive that some defines from Ogre(like OGRE_PLATFORM, _OgreExport, _OgrePrivate) break semantic.

So to summarize:
What works:
Ogre::Real - completes fine
Ogre::SOME_CONST - completes fine
function name or variable name from local buffer - completes fine

What does not work:
1)
void TutorialApplication::configureTerrainDefaults(Ogre::Light* light)
{
  light-> //a lot of garbage variants
}

2)
mRoot is defined in BaseApp.h and its type is visible in echo area.
But when trying to complete mRoot's member function in Tut.cpp I get error
(error "Cannot find types for `\"mRoot\"'").
I think semantic cannot derive its type. It can understand types of local variables only(and mRoot is defined in another file).

3)
In function main local variable is defined TutorialApplication app.
When trying to complete
app.
I always get
(wrong-type-argument semantic-find-tags-by-scope-protection parent semantic-tag-class type)

4)
When trying to complete
this->
I always get
(wrong-type-argument semantic-find-tags-by-scope-protection parent semantic-tag-class type)

Regards,
Slava

On Fri, Dec 30, 2011 at 11:57 AM, David Engster <address@hidden> wrote:
Vyacheslav Gonakhchyan writes:
> Using cedet newtrunk helped. I can complete types without a problem.
> Although when trying to complete member functions a lot of variants appear
> and non of
> them seem to be right.
> Also sometimes I get errors(like in my first message) and on second try it
> works.

Could you please provide an example, showing what you're trying to
complete and what member functions you would expect to appear? Please
provide a complete buffer, that means with all #include directives
you're using, since this is where Semantic is looking.

-David

Attachment: proj.zip
Description: Zip archive

Attachment: .emacs
Description: Binary data

Attachment: proj.zip
Description: Zip archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]