Hi,
This is the corner of CEDET where my understanding of C++ is not the
best.
The specific piece of logic is in
cedet/semantic/bovine/semantic-c.el in the overload function
semantic-ctxt-scoped-types.
Basically, only unamed namespaces are added to the local scope. By
removing the "A" from the first namespace, your sample works.
Presumably, this is not how C++ does things, so removing the filter
for only "unamed" namespaces in the above function would fix the
problem.
If thats the way C++ scoping rules work, let me know, and fixing
this ought to be easy.
Thanks
Eric
>>> Ravikiran Rajagopal <ravi.rajagopal@...> seems to think that:
>Hello,
> The C++ parser does not seem to use namespaces when resolving names for
>auto-completion. Here is a simple example:
>
>--------------------
>namespace A { class foo { public: void aa(); void bb(); };}
>namespace A {
>class bar { public: void xx(); public: foo myFoo; };
>void bar::xx()
>{
> myFoo. // <--- cursor is here after the dot
>}
>}
>--------------------
>
>Using the CVS version of CEDET on Emacs CVS (23.0.60), the analysis finds that
>the variable "myFoo" is of type "foo", but it cannot find a definition of
>type "foo" since it does not match "A::foo" as the same "foo" in the
>declaration of class "bar". Without the "namespace" declarations, the type is
>parsed correctly and the possible completions are presented. Could someone
>kindly point me in the right direction to fix this problem? I am an elisp
>novice (know just enough to muck with my .emacs) but very comfortable with
>C++; please point me in the direction of documentation if this is known.
>
>Regards,
>Ravi
>
--
Eric Ludlam: eric@...
Siege: http://www.siege-engine.com Emacs: http://cedet.sourceforge.net
|