Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] what exactly is stored in the index?

>>>> template <typename T> class A {}; 
>>>> 
>>>> void f() 
>>>> { 
>>>>          typedef int Int; 
>>>>          A<Int> a; 
>>>> } 
>>> 
>>> It seems that the class instance A<Int> should not be stored in the 
>>> index, but there should be a PDOMName representing 'A' in 'A<Int> a;' 
>>  
>> Why, if it's a local declaration? 
>
> Class A is a global binding and we need to keep track of all references  
> to global bindings, both in global and local contexts. This is needed  
> for search, rename refactoring, etc. 

I see. But given that the local type 'Int' is a typedef for the global
type 'int', shouldn't a search for 'A<int>' find the 'A<Int>' as well?

Thanks,
Nate


 		 	   		  

Back to the top