<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/106660>106660</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang] Invocation of NTTP pointer to explicit this member function is rejected
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          vasama
      </td>
    </tr>
</table>

<pre>
    https://godbolt.org/z/75vxezzoW

```CPP
C:\Users\vasama\sandbox λ cat test.cpp
struct s
{
        void f(this s&);
};

template<auto F>
constexpr void f(s& x)
{
        return F(x);
}

int main()
{
        &f<&s::f>;
}
C:\Users\vasama\sandbox λ clang --version
clang version 18.1.8
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
C:\Users\vasama\sandbox λ clang -std=c++23 test.cpp
test.cpp:9:9: error: must explicitly qualify name of member function when taking its address
    9 |         return F(x);
      |                ^
      |                s::
test.cpp:14:3: note: in instantiation of function template specialization 'f<&s::f>' requested here
   14 |         &f<&s::f>;
      |          ^
test.cpp:14:2: warning: expression result unused [-Wunused-value]
   14 |         &f<&s::f>;
      |         ^~~~~~~~~
1 warning and 1 error generated.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVU9v47YT_TTjy8CGRImyfdDBliNggf39kEPaPRaUOJLZUqSWpBwnh372Qn8Sb71ptygq2DRNDh_fGz6OhPeqNUQ58CPw00oM4WxdfhFedGJVWfmSn0PoPSQHYCWwsrWysjpsrGuBla_Ayi2_XOn11X6B6ATRYWmzaP4Uj4_zSDFC8OInT84DL-YdgBdeGFnZK0LxAMcj1iJgIB82dd_PC31wQx3QL8Db49zB5blYJbEBtgtn5dEDy4DtITm-hZ9u_akN1PVaBIKkEEOwWELyMM_U1vhA197dMEc4vI6AH2_uKAzOYAlsd73f9ps9lQnYCWWA7f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