Bug 71410

Summary: [SymbolTable] lookup fails for a nested type that inherits from a template parameter
Product: [Tools] CDT Reporter: Victor Lenet <victor.lenet>
Component: cdt-parserAssignee: Andrew Niefer <aniefer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Fix for the problem cdtdoug: iplog+

Description Victor Lenet CLA 2004-08-04 15:23:52 EDT
Origin:
C/C++ Indexer Problem: Syntax error encountered in 
file: /usr/include/c++/3.3.1/bits/basic_string.h on line: 253.

The problem is manifested by the following piece of code:

template <typename T, typename U>
class A {
    struct B : U {
        T* mpT;
    };
    B b;

    T* foo(T* p) {
        return (b.mpT = p);
};                    ^^^  

The actual problem is a lookup for T inside of B. When checking parents (U) a 
ParserSymbolTableException is thrown because a parent is a template parameter.
Comment 1 Victor Lenet CLA 2004-08-04 15:36:11 EDT
Created attachment 13759 [details]
Fix for the problem
Comment 2 Andrew Niefer CLA 2004-08-10 15:35:59 EDT
fixed in head and branch