[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (#84050)" (PR #90152)

via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 04:47:46 PDT 2024


eaeltsin wrote:

Hi,

This seems to break the following combination with overloaded -> operator - https://godbolt.org/z/jc6chKTdv

```
    template <class T>
    class Clone {
      public:
        Clone(const Clone<T>&);
        T* operator->() const;
        T* ptr_;
    };

    // Assume T* T::clone()
    template <class T>
    inline Clone<T>::Clone(const Clone<T>& t)
    : ptr_(t->clone()) {}

    template <class T>
    inline T* Clone<T>::operator->() const {
        return ptr_;
    }
```


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


More information about the cfe-commits mailing list