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

    <tr>
        <th>Summary</th>
        <td>
            [clang-cl] Using pointer to member as argument to template in the same class results in incorrect layout
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    https://godbolt.org/z/ddhddo9zP
### Reproduction
`-target x86_64-windows -std=c++23`
```
struct TestStruct {
};

template <auto memberPointer>
struct TestTemplate {
    constexpr static int constexprStaticValue = 0;

 template <int>
    struct InnerStruct {
    };

    using InnerType = InnerStruct<constexprStaticValue>;
};

struct TestRecursive {
    TestStruct link;
 TestTemplate<&TestRecursive::link> tree;
};

void TestFrame() {
 TestRecursive Test; 
}
```
### Warning
```
<source>:24:6: error: stack frame size (118115794992) exceeds limit (4294967295) in 'void __cdecl TestFrame(void)' [-Werror,-Wframe-larger-than
```

The same code works when targeting macOS or Linux. 

Cloud be related to: https://github.com/llvm/llvm-project/issues/80806

A workaround is to replace the `constexpr static` with an `enum`.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVMtu6zYQ_ZrxZmBDIvWwFl74cQ0UKNCLm7RZBjQ5sdlQpMFHnOTrC0qJ4zhpgQKCRHE4Z84ZkkeEoPeWaAH1CurNRKR4cH5BXj864x5CcHayc-plcYjxGIAvgW2BbfdO7ZyJM-f3wLavwLZKHZRy3etPKDZQLIHx8cFfdPROJRm1s2-xpphG4fcU8Xne3DfV9KStcqeA0xAV8I0EtgK2Yhya4pzy9gy_IfokI95SiDfjENrV28p2A_x9PLwj9UcjIiHwtUjRYU_9jvxPp20kD_zHF8zbc8Y7KiKidDZEej56DFFELVHb-DF5M8z9JUzKhTZYXLHASxraxnPdDP1W-zdryV8LyvGvovJsCtrux6Tbl-NY9gIC-Po7drkw_9dmXXThF8nkg366asNF0422j-f8T50DvgbWfELJZ4cvx5QfGD3Rf9B4cloNgFsvegI2B9Zd0PhML_8BX-EH2Hdn5uNE3glvtd1_v4qvg0tejm1asgr4sgG-RPLe-TwIUchHfMi8MOhXQmDzspyXZd12VdexzJSeJZEKaHSvY15Qsa7qmpZ1dQ5ri8DaQeP9vVQkzSetOQCsA9Yi1Kvp3Viarad3Q9WpyXfHT-NB2O81DO_bA2HIJKVThCfnHwOeDmRxvHr56PRC_nGDzuPv2qbnGV6mr41LCneEnvKGKowuq7-yAR0PaTeTrge2Nebp_TM9evc3yQhsq0NIFIBt58W8aC4rLAdSwrtkFeqA0aGnoxGSMB4IoSmubxw0BZ50PKCwOUw29dAUsxFuohZcdbwTE1qUbVk3vC5ZNTksRCt2vKoUPdSsVqJtST5UsiRVlq0QZT3RC1awqqhLzspyXlUzQZzVVdPwuSpEwSqoCuqFNrOsLXveZFC16FjB-cSIHZkwGChjlk44BIGx7Kd-MfRjl_YBqsLoEMMHStTRDM4rjbD7qTRQb_DP4VYfR3fCs12hCCj8PvVkY54924m2Q7vGrTYiBPQUkokhR7SVznvKd1W8uBQnyZtrK_8fezgI_icAAP__55zkBg">