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

New code completion remarks/issues

<< < (12/54) > >>

ollydbg:

--- Quote from: koso on September 27, 2009, 09:18:14 pm ---Hello, using latest SVN build (and probably not only latest), I am having problem with code completion for variables declared using "struct" keyword. For example:


--- Code: ---#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void)
{
struct tm *current;
        current->
}

--- End code ---

I dont get any suggestions when typing "current->" and also nothing when trying to complete "curr". It works as expected without keyword struct in declaration.
I tried to find symbol current using Code completion debug tool, but i get only empty list with information, that were found Multiple matches and i must choose :P


--- End quote ---

I can confirm this bug.
The struct tm is correctly by the parser.

But this code works.


--- Code: ---#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void)
{
    struct tm current;
    current.
}


--- End code ---

auto completion list can be shown after the dot.


Edit

--- Quote ---I tried to find symbol current using Code completion debug tool, but i get only empty list with information,

--- End quote ---

This is because the variable "current" is not in the global token tree.
It is just in temporary token tree in the scope of "main".

ollydbg:
continue the discussion of reply # 55

I just test this code:


--- Code: ---#include <stdio.h>
#include <stdlib.h>
#include <time.h>

struct tm * current;

int main(void)
{

    current->
}

--- End code ---
But I can't find "current" in the global token tree. So, I believe there is something wrong with parsing the statement:




--- Code: ---struct tm * current;

--- End code ---

Need time to find the bug...

ollydbg:

--- Quote from: koso on September 27, 2009, 09:18:14 pm ---Hello, using latest SVN build (and probably not only latest), I am having problem with code completion for variables declared using "struct" keyword.

--- End quote ---

This bug is fixed by this patch

see the new patch on this post

http://forums.codeblocks.org/index.php?topic=11187.msg76648#msg76648

here is the test code:


--- Code: ---struct tm
{
int tm_sec;
int b;

};

struct tm *current;

int main(void)
{

    current->
}

--- End code ---

and this is the screenshot:

mmkider:
I Found a crash, See picture.
At last, I need keyin '\n' but I keyin '\'. it will crash.


[attachment deleted by admin]

ollydbg:

--- Quote from: mmkider on September 28, 2009, 05:25:29 am ---I Found a crash, See picture.
At last, I need keyin '\n' but I keyin '\'. it will crash.


--- End quote ---

I can't reproduce the crash when entering only one statements, can you give a simple testing code?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version