hubert-reinterpretcast wrote: I think (at least part of) the fix is to add a condition to
https://github.com/llvm/llvm-project/blob/21e6777957457451196084cd48ebc42bce9619f0/clang/lib/Sema/SemaExpr.cpp#L14117-L14120 that the operand is not parenthesized. For reference, the address-of-member-function case checks for parentheses this way: https://github.com/llvm/llvm-project/blob/21e6777957457451196084cd48ebc42bce9619f0/clang/lib/Sema/SemaExpr.cpp#L13908-L13912 This should address the pre-existing bug with: ```cpp namespace std { template <typename, typename> struct is_same { static constexpr bool value = false; }; template <typename T> struct is_same<T, T> { static constexpr bool value = true; }; } struct S { int &x; static_assert(std::is_same<decltype(&(S::x)), int *>::value, ""); }; ``` https://github.com/llvm/llvm-project/pull/89713 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits