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

Vladislav Belov via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 16 17:47:26 PST 2024


vbe-sc 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! You're right, this test failed with this patch, but I've already fixed it (see the new changes).
Moreover, I have added more tests that should and shouldn't compile.

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


More information about the cfe-commits mailing list