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

Bug 359364

Summary: Name resolution accesses ambiguous nodes (during ambiguity resolution)
Product: [Tools] CDT Reporter: Markus Schorn <mschorn.eclipse>
Component: cdt-parserAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, malaperle
Version: 8.0   
Target Milestone: 8.0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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