Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Code Completion fails at extern declared functions
christobal:
--- Quote from: ollydbg on March 12, 2010, 04:06:02 pm ---@christobal
I'm confused about your discussion, can you give a simple test case? or where is the patch?
--- End quote ---
The Patch is the code snippet from my fist post and the test case is the code snippet from my second post.
The problem is, that every token after the "extern" keyword get "swallowed" by the tokenizer without evaluation, and so the extern declared symbol won't appear in the codecompletion unless the implementation of this symbol can be found elsewhere in the project. In most cases, you will have the implementation in the same project and so the codecompletion will work. But if you use a library in your project and just have the headers, you won't see any symbols that have been declared with the extern keyword.
I hope I made this clear :)
By the way, this is just a bugfix and has IMHO nothing to do with the CodeCompletion redesign.
ollydbg:
@christobal
Ok, I see. If you have both a declaration and a function declaration in your project, how can CC locate the true location of a function declaration?
For example, you have A.h, and it contains:
--- Code: ---extern void f();
--- End code ---
And in B.h, you have :
--- Code: ---void f();
--- End code ---
Then, both A.h and B.h was in your project, so, the parser must have two "f" declarations if your not skip extern statement.
Technically, it is really easy to handle "extern" statement, but we need some comments from CB's developers. :D
ivan1979:
Hi,
that's my problem!
I include many arm-linux toolchain headers (pthread.h, sys/time.h, ...) but i can't see functions tooltips help because they are all declarated as extern functions...
ivan1979:
Hi,
i have just recompiled codeblocks and modify the parserthread.cpp on according christobal patch, so i replaced the libcodecomplete.so with the new owe...it works!!!
Thanks
Ivan
Navigation
[0] Message Index
[*] Previous page
Go to full version