[cfe-dev] using declarations

Sebastian Redl sebastian.redl at getdesigned.at
Mon May 11 10:33:55 PDT 2009


Douglas Gregor wrote:
> Hello John,
>
> On Apr 16, 2009, at 5:20 PM, John Thompson wrote:
>   
>> Question:  When encountering a name corresponding to a using  
>> declaration in an expression, is just substituting the target  
>> declaration okay? I'm worried that losing the semantic information  
>> about an identifier in a statement or expression corresponding to a  
>> using declaration might be an issue.  But just substituting the  
>> target decl makes for simpler code so far.
>>     
>
> I think this is the right thing to do, but I suspect that we should do  
> this substitution of the target declaration much sooner, e.g., as part  
> of name lookup (in SemaLookup.cpp) when we are not looking for a  
> redeclaration.
>
>   


But we cannot do this for C++0x-style type aliases with the using
keyword. We should probably build a different declaration for those
anyway, but I feel the name UsingAliasDecl is slightly misleading in
this case. Why not just UsingDecl?

Sebastian



More information about the cfe-dev mailing list