Bug 68131 - C++ parser problem with declarations in the first field of "for" statement
Summary: C++ parser problem with declarations in the first field of "for" statement
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Code completion (show other bugs)
Version: git master
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-13 17:05 UTC by Sylvain Joyeux
Modified: 2005-03-11 05:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain Joyeux 2003-11-13 17:05:06 UTC
Version:           CVS of 06 november 2003 (using KDE KDE 3.1.4)
Installed from:    Debian testing/unstable Packages
OS:          Linux

when writing the following :

struct foo
{
  int a;
  int b;
};

int bar()
{
  struct foo test[5];

  for (foo* current = test; current; ++current)
    current ->
}

the type of "current" is not guessed (after the ->), whereas it is when writing
  foo* current;
  for (current = test; current; ++current)
    current ->
Comment 1 Adam Treat 2005-03-11 05:43:39 UTC
This has been fixed although it'll be another day before I can fix it for blocks that don't have {} enclosing the statement list.

Here is the cvs message:

CVS commit by treat: 

* Complete on vars declared in the init part of a for loop and make completion
work on the conditional part of an if/else


  M +5 -6      cppcodecompletion.cpp   1.160