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

    <tr>
        <th>Summary</th>
        <td>
            Clang diagnostics issue: Candidate ignored without reason provided
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          jeremy-rifkin
      </td>
    </tr>
</table>

<pre>
    Pardon the large demo, this came up when resting something with a library I've been writing.

In this example, https://godbolt.org/z/1o4nr958b, clang errors

```cpp
<source>:1232:5: error: no matching function for call to 'foo'
    foo<bar(2)>();
    ^~~~~~~~~~~
<source>:1224:22: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'X'
template<int X> void foo() {}
                     ^
```

Without providing a reason why the template is ignored. GCC reports that the macro is expanding to have a problematic local `static` variable.

Similarly after removing the `static` qualifiers there are other problems with calling non-constexpr functions but clang still does not provide a diagnostic as to why the explicitly-specified argument is invalid https://godbolt.org/z/7xGrecxfe.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFU01zmzAQ_TXiorEHBBj7wCFx0kxunemhuS5isZUKRCVhx_31XQl_JG0n9YAlodXue2-fGtOe6q9gWzNwv0euwe6Qt9gbJrb0RTkuoUc-jfy4x4FbdF4NO-5Mj7RLs6Pyew5cq8aCPfFnJqoD8gYp-GhVCF6y9IGld_P_8zBnxTfoR42hyt770bH8jokv9OxM2xjtl8buaPWL3swUg92U6yYESw1UFK011r3Py1bp_MhxPH_Jt85MViLLHyl7JnJBQ0nvfDxMBsN78DIS6aZBekU6dMYSaa25N5zYdIa0qOacnH5hnW8bsEysBRObkF6s4-T-FsXKR1Z9-vwbpChoEGIG5zGMEoZWteCReyTNwkTtBmOxDbtqOIBWLQk6aiWV16eFG1GqTmHLqZtTj4OPnK6nR7DUU4820Hu5krvsEyZFR14IEj8YSh0VCAw5q-5Z9XBj-dcv0P7Yj_dN-k5eMZPnozUH1QbRgRwFjkQ_7k_RgDeK7sJyyZ-2W4objfWOgsDHyB6kNTxaaQwKUTZq2B7IfRAqNBqpt0pybaibnKA4H9Y04QewCijggzW_qV6R__WJQxfEsXQLDjEtVftw_OdEkpPANsBBSwXpNWF6KezmexFsFDIMZlhIMzhPWO3VaY43JMbsaLpW5LjWoAt9PysUmLQKSAYXiIALDC9Kfd7wIN_ZGf-7X9Xbk0X51uEyaeu83eQbSDzlxXobod0QUE7npmjK7dWU5y5FwqG554aeGbTJZHX9BwSKnJqlND0ttD5chgWdeUXpaRnrOJqUZZHlyb6GDjoJVYpFma4zUTaNKGXRNdUKhFwDJBoa1K5m5T0TYsDjGSpdpfIhUbVIhUjLTGSbMi_KZZbhqsi6cHaVl2nFipTcovQy4AjaJLaOkJpp52hTK-fdbROcI9qIsRzlh4m42_qVvNCfFlZ1P9SQRAB1JPAbXJu-oQ">