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

    <tr>
        <th>Summary</th>
        <td>
            Wrong error "same mangled name" "previous definition is here" is generated for template instantiations (operator overloads?) (maybe "auto" template parameter related)
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          mick-p1982
      </td>
    </tr>
</table>

<pre>
    I'm trying to add Clang to a projects supported targets with Visual Studio 2022 fresh install, up to /std:c++20 mode. I can just provide this text emitted by these errors because they don't provide any other information. Whatever it is I don't think this error is intended to prevent template instantiations. The "previous definition is here" notes refer back to the exact same line of code.

Logically there can't be a name clash on templates. My hunch is LLVM doesn't fully understand "auto" in template parameters with respect to pointer-to-member constants.

```
                template<int ID, auto PtoM>
                /**TEMPLATE-SPECIALIZATION
                 * ...
                 */
                class Value<ID,bool,PtoM> 
                :
                public InnerValue<ID,bool,PtoM,daeBoolean>
                {
                        /*...*/
                };
```

In this case it gets stuck in InnerValue's operator overloads. I think possibly either PtoM isn't properly mangled to be a unique value for different classes/offsets, or it doesn't actually require additional mangling, but the error shouldn't be emitted (assuming some other part of the compiler assures type correctness.) This is the only idea I have.

```
1>..\dom\include\dae\..\DAEP.h(1572,32): error : definition with same mangled name '??C?$InnerValue@$00_N$0CM@VdaeBoolean@ColladaDOM_3@@@DAEP@ColladaDOM_3@@QBEPBVdaeBoolean@2@XZ' as another definition
1>..\dom\include\dae\..\DAEP.h(1572,32): message : previous definition is here
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytVU1v2zgQ_TXyZRBDluLYPvjgOAlgIG6zaJEueikoaWSxkUiVpNL63-8b2kmcZtO9LEBT5tfMm-F7w8JW--UmyWYdBbfXZkfBkqoqWrfqOKDe2e9cBk9-6HvrAlcUlNsxZn7q0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