Bug 68623 - [Parser] Incorrect scope used when parsing ctor initializers
Summary: [Parser] Incorrect scope used when parsing ctor initializers
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Andrew Niefer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 69428
  Show dependency tree
 
Reported: 2004-06-25 11:12 EDT by Andrew Niefer CLA
Modified: 2004-08-10 13:23 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 Andrew Niefer CLA 2004-06-25 11:12:31 EDT
The scope of the declaration is used to perform lookups while parsing the 
ctorInitializer.  This is the incorrect scope since the constructor initializer 
can reference symbols in its class.  This causes problems trying to parse 
expressions used to initialize the fields.

We should do something similar to what we do for functions:
IASTScope ctorInitScope = astFactory.getDeclaratorScope(scope, d.getNameDuple
());
Comment 1 Andrew Niefer CLA 2004-07-08 17:40:48 EDT
fix applied to head.  will be propagated to 2.0.1 later
Comment 2 Andrew Niefer CLA 2004-08-10 13:23:09 EDT
fix is now in 2.0.1