[clang] [Clang] Fix name lookup for dependent bases (PR #114978)

via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 16 17:46:16 PST 2024


kolobabka wrote:

> I don't think this patch fixes the following case:
> 
> ```c++
> template<typename T> 
> struct A 
> {
>     struct B 
>     {
>         using X = int;
> 
>         struct C
>         {
>             using X = void;
> 
>             struct D;
>         };
>     };
> };
> 
> template<typename T> 
> struct A<T>::B::C::D : B
> {
>     X x; // error: field has incomplete type 'X' (aka 'void')
> };
> ```
> 
> Regardless, this patch should probably include this as a test.

Many thanks for your answer! Yor're right, this test failed with this patch, but I've fixed it yet (see new changes). 

Moreover, I have added more tests to verify cases that should compile and those that shouldn't.

https://github.com/llvm/llvm-project/pull/114978


More information about the cfe-commits mailing list