[cfe-dev] Parsing MFC code with clang - some info of coming works

Sebastian Redl sebastian.redl at getdesigned.at
Mon May 9 11:36:39 PDT 2011


On 09.05.2011, at 02:25, Francois Pichet wrote:

> But then there are 2 issues that will be more challenging and I plan
> to work on them in the coming weeks.
> 
> 
> 1. Allow to specialize a function within class scope.
> Example:
> class A {
>    template<typename T> _com_ptr_t(T* p)
>    {
>    }
> 
>    template<> _com_ptr_t(char* str)
>    {
>    }
> };
> 

That shouldn't be too hard. AFAIK, this is mostly removing a rather arbitrary restriction.

> 
> 2. Unqualified lookup into dependent bases of class templates
> Info here: http://clang.llvm.org/compatibility.html#dep_lookup_bases
> 
> This one is causing the majority of compile errors when parsing MFC
> code with clang.
> I admit trying to implement this one scare me a little..

I think the strategy is to make delayed template parsing substitute types immediately, so that you never *have* dependent bases. I believe that's what MSVC does, anyway.

Sebastian





More information about the cfe-dev mailing list