Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326750

Summary: [c++] The name of the class can be reused for a class member
Product: [Tools] CDT Reporter: Markus Schorn <mschorn.eclipse>
Component: cdt-parserAssignee: Nathan Ridge <zeratul976>
Status: RESOLVED FIXED QA Contact: Mike Kucera <mikekucera>
Severity: normal    
Priority: P3 CC: malaperle, yevshif, zeratul976
Version: 8.0   
Target Milestone: 8.3.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Schorn CLA 2010-10-01 04:50:57 EDT
Example:

struct S {
  int S;
};
void tint(int);
void test() {
  S s;
  tint(s.S);  // Problem binidng here.
}
Comment 1 Markus Schorn CLA 2013-07-03 05:15:24 EDT
*** Bug 412168 has been marked as a duplicate of this bug. ***
Comment 2 Nathan Ridge CLA 2013-12-22 04:10:11 EST
The problem was that CPPClassScope.getBindings() was exiting early and just returning the class name if the name being looked up was equal to the class name, rather than going on to look for members with that name.

Patch: https://git.eclipse.org/r/20147
Comment 4 Marc-André Laperle CLA 2014-03-10 17:05:21 EDT
Fixed in 8.3.