Bug 69213 - When working with C source using C++ keywords interferes with the outliner
Summary: When working with C source using C++ keywords interferes with the outliner
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Andrew Niefer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-02 12:12 EDT by Daniel Thompson CLA
Modified: 2004-07-08 13:41 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.