Bug 567310 - Code completion with variables won't suggest the
Summary: Code completion with variables won't suggest the
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 10.0.0   Edit
Hardware: PC Windows 10
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-24 04:16 EDT by Juha Viitanen CLA
Modified: 2020-09-24 06:21 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juha Viitanen CLA 2020-09-24 04:16:37 EDT
Exact version:   C/C++ Development Tools	10.0.0.202009071455	org.eclipse.cdt.feature.group	Eclipse CDT

Code completion with even simplest possible example won't work.

#include <stdio.h>
#include <stdlib.h>

int foo = 0;

int main(void) {
	puts("SDL"); /* prints SDL */
	return EXIT_SUCCESS;
}


Autocompletion won't start suggesting me the "foo" when I type "fo" and press ctrl+space. It will suggest library functions though.

1. I made example project using the File-New-C/C++ project.
2. Added global variable called foo.
3. Tried to assign a value to foo by first typing "fo" and pressing ctrl+space.
4. I was not listed in the dropdown menu.

I first noticed this when using much larger codebase, like more than 100000 lines of C and it didn't suggest me the structure members like it would normally would.

Indexer happily says that the variable exists by not showing any errors on the editor.

Everything works in CDT 
C/C++ Development Tools	9.11.1.202006011430	org.eclipse.cdt.feature.group	Eclipse CDT