Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359364 - Name resolution accesses ambiguous nodes (during ambiguity resolution)
Summary: Name resolution accesses ambiguous nodes (during ambiguity resolution)
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 8.0.2   Edit
Assignee: Markus Schorn CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 04:27 EDT by Markus Schorn CLA
Modified: 2011-10-05 12:41 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Schorn CLA 2011-09-29 04:27:04 EDT
Here is an example:

template <typename T> struct CT1 {};
template <typename T> struct CT2 {};

typedef char Tdef;

template<> struct CT1< CT2<int> > {
   CT1<Tdef> x;       // Ambiguity resolution causes lookup in CT1< CT2<int> >
};

template<> struct CT2<Tdef> {}  // Ambiguous and accessed before resolution.
Comment 1 Markus Schorn CLA 2011-09-30 04:16:45 EDT
Added testcase and fix.
Comment 2 CDT Genie CLA 2011-10-03 10:23:05 EDT
*** cdt git genie on behalf of Markus Schorn ***

    Bug 359364: Prevent premature access to ambiguous nodes.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=9adfab7918fcd9bed971e3f4ef6950516a3024a5
Comment 3 CDT Genie CLA 2011-10-03 10:23:07 EDT
*** cdt git genie on behalf of Markus Schorn ***

    Bug 359364: Prevent premature access to ambiguous nodes.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=cfd0941737a1f4f7ebf90b4b25ccdf7ed6363f5b