Bug 280591

Summary: Code completion for member names in C structure initializers
Product: [Applications] kdevelop Reporter: Rick Wagner <rjwgnr27>
Component: Language Support: CPP (old)Assignee: kdevelop-bugs-null
Status: CONFIRMED ---    
Severity: wishlist CC: aspotashev, craftplace.ms, kfunk, yar
Priority: NOR    
Version: 4.5.1   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Rick Wagner 2011-08-22 19:37:37 UTC
Version:           4.2.60 (using KDE 4.6.5) 
OS:                Linux

Given the structure:

struct myStruct {
  int x;
  int y;
};

Use name member initialization: 

struct myStruct mine = { .x=1, .y=2 };

The syntax highlighter shows an error at the "." of ".x".

Also, code completion should work for the member names in the completion list.


Reproducible: Didn't try

Steps to Reproduce:
Use named structure initialization as shown above.

Actual Results:  
The parser does not recognize the syntax, flagging an error (red squiggly underline) at the first ".".

Expected Results:  
Parser should not indicate an error. Code completion should offer member names as they are typed.
Comment 1 Alexander Potashev 2013-12-15 01:22:56 UTC
*** Bug 276128 has been marked as a duplicate of this bug. ***
Comment 2 Alexander Potashev 2013-12-15 01:27:17 UTC
I don't see errors in KDevelop 4.5.1 (Gentoo, KDE SC 4.11.2). Code completion is still unimplemented though.
Comment 3 Andrey Cygankov 2016-01-23 23:39:00 UTC
I tried to reproduce the bug in KDevelop 5 - all displayed without errors.
http://i.imgur.com/0SY7PXp.png
Probably it is necessary to close.
Comment 4 Kevin Funk 2016-09-08 20:00:59 UTC
Right, code parses fine now.

We still lack the code completion part, though.