https://bugs.llvm.org/show_bug.cgi?id=52369

            Bug ID: 52369
           Summary: error taking typedef from nested class instead of
                    parent class
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: fchelno...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

This valid program (accepted by GCC):
```
template<class T> struct A {
  typedef int M;
  struct B {
    typedef void M;
    struct C;
  };
};

template<class T> struct A<T>::B::C : A<T> {
  M m;  // must be OK, A<T>​::​M
};
```
produces an error in Clang, because it takes M from A<T>::B instead of expected
A<T>. Demo: https://gcc.godbolt.org/z/cMTYboP1Y

Related discussion: https://gcc.godbolt.org/z/cMTYboP1Y

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to