yxsamliu wrote: This patch seems to cause a regression for rocThrust:
https://github.com/ROCm/rocThrust/blob/f3a28e43355b0f439fb99a2210bd497ca59c8003/thrust/optional.h#L2756 rocThrust/thrust/../thrust/optional.h:2756:11: error: no member named 'construct' in 'optional<type-parameter-0-0 &>' A reduced test case is ``` template<typename T> struct A { T* m_value; void foo() { this->doit(); } T *operator->() { return m_value; } }; ``` https://godbolt.org/z/eo5f3Wdv5 It seems clang does not account for the situation that the arrow operator may be overloaded to return an pointer to a template parameter type whose members are unknown. https://github.com/llvm/llvm-project/pull/90152 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits