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

    <tr>
        <th>Summary</th>
        <td>
            Ambiguity when using __declspec property (ms-extension)
        </td>
    </tr>

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

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

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

<pre>
    The following code snippet reproduces the issue, also on [godbolt](https://godbolt.org/z/vfoY7b73Y)
Expectation is that a property has the same rules for disambiguation as an underlying accessor method.

```
#include <map>
#include <iostream>

struct A
{
    using mapType = std::map<int,int>;
 A(mapType&& m) : valuesMap{m} {};

    __declspec (property(get = getValues)) mapType & Values;
    mapType& getValues() { return valuesMap; }
    __declspec (property(get = getValues)) mapType const& Values;
 mapType const& getValues() const { return valuesMap; }

private:
 mapType valuesMap;
};


int main()
{
    const A a{A::mapType{{1,1}, {2,2}}};

    std::cout << a.getValues().size() << "\n"; // This is OK, no ambiguity
    std::cout << a.Values.size() << "\n"; // This also should not be ambiguous, MSVC does not complain
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVE2PozgQ_TWVS6kjKCchOXBISOeyGu1hWyPNaWRMJXhlbGSb7sn8-pUhX9PTUms1EipARdV7vHI9GYI-WeYSljtY7mdyiK3zZXPytVaz2jXn8qVlPDpj3Ju2J1SuYQxW9z1H9Nx71wyKA8aWUYcwMFCF0gSHziIsdyfX1M5EWO6B1m2MfQCxBToAHS6pufMnoMNPoMPr0X0r6kJ8A9pAtods-_yjZxVl1M6iTigyosTeu559PGMrJ-QgO0Y_GA54dB4bHWRX69MwFcqA0uJgG_bmnH5CKsUhOI8dx9Y18wnrElfZ5ZpeSWirzNAwgqg62YN4_iijXYieZXdPjzFEP6iI197FbnpARBxCotLJ_uXcpxZ7DLFJ4ojtCFNpG4HGKJ5BXCu3QOtLEdAKaIUd0AZBbPFVmoHDF9lDseug2GPCK_a32jv29-8NKxN6Vgi0vsoJtD5xHKmcOH4du6VJ0OZOk1Z4SYiHf7kTeqxcj8SKHXqOg7cP_MQOE7E_56OcDfEjUr998J7XmPic3RR7r19l5DSdX9s_Fl1n_F7wKWobsZPaTvAfnIeJ0BYlFLvt7RyMsqYx7nKgKk_dqUq0Caii9Dpdv8_4dpqUG5KIFYgK5fydDvOgf_J1VNM3QATLyqZbUmLcVXxpdUgb-PdfCd86nBZMx_OniBPc_wIaDSS0bjANWhex5gueG0LC__LP1wobx2HMKtf1Jkl7G8CvmzxrStFsxEbOuMxXm2yTZXm2mrWlZJIslWiK41LWLHOxqPMVbyQVoshzOdMlZSSydZbnC1rTap4tj5LUQhVLycdMLmGRcSe1mRvz2iUnm40mWK4WIlvPjKzZhNFbiSy_XR2SktX6MtU81cMpwCIzOsRw7xJ1NFxurxrjW8v24hgPu3LzweQJ4Yl_RLZBOwu0mQ3elO_8Vsd2qOfKdUCHhHS5PfXe_csqAh1GfgHoMPL_LwAA__8DQdSv">