Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

code complete parse problem

(1/2) > >>

jack:
I've just upgraded to CB 10.05, but I found code complete did not work as expect. Here is the example code:


--- Code: ---typedef struct {
char *md5;

} plugin_data;

#define INIT_FUNC(x) \
static void * x(server *srv)

INIT_FUNC(mod_foo_init) {
plugin_data *p;

p->  /* not work here */

}

--- End code ---

Hope the patch releases soon. Thanks

oBFusCATed:
Does it work if you replace:
 INIT_FUNC(mod_foo_init) {
with:
static void * mod_foo_init(server *srv) {

The current CC, doesn't do preprocessor replacements, but there is patch in the special branch for the CC improvements that should work.
You can try that branch if you have time and courage :-P

ollydbg:
I just test the code below using the latest cc_branch


--- Code: ---typedef struct {
char *md5;

} plugin_data;



void mod_foo_init(server *srv) {

plugin_data *ppppp;

ppppp->;

};

--- End code ---

Here is the log output(enable the smart cc AI log)


--- Code: ---AI() AI enter, actual_search: "    ppppp->"
AI() =========================================================
AI() Doing AI for '    ppppp->':
FindCurrentFunctionStart() Looking for tokens in 'F:\cb\testCode\namespacetest\main.cpp'
FindCurrentFunctionStart() Found 0 results
FindCurrentFunctionStart() Can't determine current function...
BreakUpComponents() Breaking up '    ppppp->'
BreakUpComponents() Found component: 'ppppp' (Class)
BreakUpComponents() Adding component: 'ppppp'.
BreakUpComponents() Found component: '' (SearchText)
BreakUpComponents() Adding component: ''.
ResolveExpression() search scope is 1 result.
search scope: -1
ResolveExpression() Looping 0 result.
AI() AI leave, returned 0 results
0 results
Reparsing while typing for editor F:\cb\testCode\namespacetest\main.cpp
--- End code ---

It seems there are some bugs. I'll check it.

jack:

--- Quote from: oBFusCATed on May 31, 2010, 01:25:51 pm ---Does it work if you replace:
 INIT_FUNC(mod_foo_init) {
with:
static void * mod_foo_init(server *srv) {


--- End quote ---

It works.

oBFusCATed:
ollydbg: you're testing in the CC_branch right?

Navigation

[0] Message Index

[#] Next page

Go to full version