Re: XCode codesense very broken for C++ ???
Re: XCode codesense very broken for C++ ???
- Subject: Re: XCode codesense very broken for C++ ???
- From: Andreas Grosam <email@hidden>
- Date: Fri, 14 Oct 2005 18:07:05 +0200
On 14.10.2005, at 16:46, Markian Hlynka wrote:
I figured someone would know how to force the index to rebuild.
But, I'm finding codesense kinda cool... though sometimes flakey. I'm
having different problems than Jónas is having. I do think I noticed
something about typedefs once, but I couldn't remember what it was, or
I would have replied.
I also read the documentation on how to use CodeSense, and it didn't
seem to make sense... or didn't work that way... but I'm tired, so
I'll give it another go later and see if it's better. ;-)
Markian
On Oct 14, 2005, at 8:12, Jónas Tryggvi Jóhannsson wrote:
Hi all.
I sent a question if it could be true that typedefs makes XCode's
codesense stop working and got no replies. I also did see Markian
asking about strange codesense bugs using C++ in Xcode and getting no
replies.
Actually, it seems the indexer is unable to properly parse C++.
Especially namespaces, quilified names, templates, local classes,
typedefs and even plain structs do not appear as struct.
Furthermore, language extensions, like __attribute__ confuse the
indexer as well. For instance,
class EXPORT MyClass
{
};
Show up in the index as
class EXPORT
Furthermore, the indexer seems only to accumulate new symbols, but
never removes them, even when the file which they are defined is no
longer part of the project.
Furthermore, the xcode's indexer does not take care of built-in macros
set by the compiler / preprocessor.
Not sure if it now takes the command line macros into account.
Furthermore, the xcode's indexer sometimes seems also to evalute
different header paths than the compiler would do.
Furthermore, the xcode's indexer sometimes finds include headers which
will not be find by the compiler (maybe caused by the framework
feature: <myframework/myframework.h>)
And vice versa.
And sometimes it finds nothing for no obvious reason (possibly a
problem with stale or cached indexer data).
The xcode's indexer currently does not index per "translation unit".
Means, a symbol - say a macro may be defined in each translation unit
differently. So if an indexer searches for a symbol, a "context" should
be set. When typing in a module and such a feature like xcode's code
sense is active, this is the current file - means its associated
translation unit (which also always includs a possible prefix or
precompiled header). This would lead to one and only one definition of
the symbol (if the code is correct, in C/C++: the One Definition Rule).
But when searching a symbol globally (for instance typeing in a header,
or generating a symbols list), there is no specific "context", say
translation unit, and hence all translation units of the project, or
optionally of the current target should be taken. Then, multible
definitions of the same symbol name may be possible.
AFAIK, in xcode all symbol definitions will be merged somehow, thus if
you have multible definitions - say a macro - which is defined multible
times differently in each translation unit, xcode might not be able to
correctly point to its corresponding definition (per
CMD-mouse-double-click) for a certain translation unit, nor might it
provide all possible definitions if the context is not defined.
This all sounds a bit disappointing, but in fact it already works ok in
many cases and its getting better and better.
C++ support is indeed improvable, though.
I think Apple is aware of all of the current problems and is working to
fix it.
If anything is really important in an IDE, then it's its indexer!!
Andreas
This makes me wonder if XCode´s codesense is just unusable for C++?
It keeps suggesting functions that aren't a member of the class that
I'm working on, so it almost seems like its just guessing from all
known functions or something!
Can anyone comment on this? I feel like I'm back to stone age after
switching from the beta version of VS.NET 2005 C++ edition on my old
PC to XCode 2.1 on my mac :(
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
----
When arguing with an idiot, be sure they aren't doing the same.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden