Bug 81330 - Code completion in C files doesn't work for typedefs
Summary: Code completion in C files doesn't work for typedefs
Status: RESOLVED DUPLICATE of bug 74347
Alias: None
Product: kdevelop
Classification: Applications
Component: Code completion (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-11 14:37 UTC by Boris S
Modified: 2004-05-14 23:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris S 2004-05-11 14:37:40 UTC
Version:           3.0.x (using KDE KDE 3.2.2)
Installed from:    RedHat RPMs
OS:                Linux

It looks like the issue has been brought up before for C++.
However this bug is specific for C projects right now. it can be reproduced easily

this is the code ( important: C only project)

typedef struct mystruct_
{
  int a;
  int b;
}my_type_t;

int func()
{
  my_type_t var;
  my_type_t *ptr;
  
  ptr=malloc(sizeof(my_type_t));

  var.[CTRL-SPACE]
  ptr->[CTRL-SPACE]
}

in both cases code completion fails;
if you remove typedef and just use
struct mystruct_ var;
then code completion works perfectly.

So this is an issue related to typedefs

FYI C++ specific project options have typedefs are enabled for code completions. I am not sure if it supposed to affect C projects.  In any case enabling it there doesn't make code completion work, unfortunately.
Comment 1 Jens Dagerbo 2004-05-12 18:16:56 UTC
Does this example work in a C++ project, or why do you think it is "specific for C projects"?
Comment 2 Jens Dagerbo 2004-05-14 21:48:57 UTC
Still hoping for an answer. Setting component to code completion.
Comment 3 Jens Dagerbo 2004-05-14 23:38:43 UTC
OK, found the other report..

1. This doesn't work for C++ either.
2. C and C++ uses the same language support part.

Conclusion: dupe. Closing.

*** This bug has been marked as a duplicate of 74347 ***