Bug 69213

Summary: When working with C source using C++ keywords interferes with the outliner
Product: [Tools] CDT Reporter: Daniel Thompson <daniel.thompson>
Component: cdt-parserAssignee: Andrew Niefer <aniefer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Daniel Thompson CLA 2004-07-02 12:12:16 EDT
The outliner (silently) leaves off certain valid C functions because they
contain C++ keywords. I guess they break the outliners parser but its still
annoying.

Although I observed to problem is a complex program the following, very simple,
example demonstrates the problem. The function will not be displayed in the
outline view because it uses the C++ reserved word 'this' as the name of its
argument.

static int breakTheOutliner(int this) {
	return this + 1;
}
Comment 1 John Camelon CLA 2004-07-05 07:49:50 EDT
Is the containing project a C or C++ project? 
What type of file (.h, .C, .cc etc.) contains this declaration?
Comment 2 Daniel Thompson CLA 2004-07-06 05:42:04 EDT
This problem manifested itself on a 'Standard C Make', the source file ended .c
and I was using Eclipse 3.0 RC3 with CDT 2.0 M9.

The problem no longer manifests itself using the overnight builds (I tested CDT
2.0 I20040628).

Note that there were severe problems storing settings for this type of project
in M9 (see bug 69147). I think it possible that this bug was, in fact, another
manifestation of that problem.
Comment 3 Andrew Niefer CLA 2004-07-08 13:41:53 EDT
Using the 2.0 release, I created a new Standard C make project with a file 
named t.c, and the given code works fine in the outline view.

The problem would be explained by the project telling the parser the wrong 
language for the file, which now seems to be working.