Re: [CEDET-devel] semantic-analizer : new C++ joy!
Brought to you by:
zappo
From: Hannu K. <az...@ik...> - 2007-02-15 00:05:12
|
"Eric M. Ludlam" <er...@si...> writes: > Checked into CVS for CEDET, please find updated C parser support, > and a new version of the analyzer that can now correctly identify the > scopes of method implementations within namespaces for C++. > > Also see two new C++ test files for subclasses which I was using to > attempt to simplify the problem to something I could debug. > > I'll be giving this a try on some really big code soon to see if it > can handle it. I wanted to try this new goodness as well. A few observations. First I got this: idle error: "#<buffer hukka.cpp> - Symbol's function definition is void: semantic-dependency-find-file-on-path" [9 times] Apparently the only place that calls that function is semantic-tag-file.el. For some reason there are functions semantic-dependency-find-file-on-path and semantic--dependency-find-file-on-path in semantic-dep.el and _only the latter_ is autoloaded. I worked around by manually loading semantic-dep. semantic-idle-completions-mode doesn't seem to have any effect. I start getting "ifdef THREADS yes" messages, though, so I suspect this might be due to my CVS Emacs from 2005-12-18 being buggy. Maybe better forget this until I install a more recent Emacs. semantic-complete-analyze-inline gives me a popup window with completions but it immediately disappears. I also get "Bug Showing Completions: (wrong-type-argument integerp nil)" at some point. This might be a problem with my weird Emacs version as well, so I'll retry this when I install a more recent Emacs. semantic-ia-complete-* functions seem to work... for my small example project that doesn't use namespaces. Testing with a large project that uses namespaces wasn't so successful. I managed to reproduce the first problem I saw with a small example. Suppose I have foo.h as follows: --------------------------------------------------------------- class Kala { public: void kalasta() {} }; namespace a { namespace b { class Foo { public: void bar() { } void baz() { } }; } } --------------------------------------------------------------- And foo.cpp: --------------------------------------------------------------- #include "foo.h" namespace a { namespace c { void dum() { } } } --------------------------------------------------------------- Then I start experimenting inside dum(): void dum() { Ka<M-x semantic-ia-complete-symbol-menu RET> } results to "No completions available." Ok, maybe it's not supposed to complete class names in such a case. Let's continue void dum() { Kala kala; kala.<M-x semantic-ia-complete-symbol-menu RET> } works, i.e. gives me just one completion, kalasta(). Good. Next void dum() { b::Foo foo; foo.<M-x semantic-ia-complete-symbol-menu RET> } gives me bogus completions: dum () : void foo : Class b::Foo kala : Class Kala ...instead of bar() and baz(). Since the actual project is almost nothing but code that corresponds to this last case, it's not really meaningful to test further before this is fixed. -- Hannu |