<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/61566>61566</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Pointless -Wundefined-internal warning from concept checks
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
timsong-cpp
</td>
</tr>
</table>
<pre>
```cpp
auto begin(auto&& r) {
return r.begin();
}
template<class T>
concept Range = requires (T t) { ::begin(t); };
namespace {
struct R {
int* begin();
};
}
static_assert(Range<R>);
```
Here, I'm just trying to check the concept; nothing is actually calling `::begin` or `R::begin`. Yet clang warns:
```
<source>:10:14: warning: function '(anonymous namespace)::R::begin' has internal linkage but is not defined [-Wundefined-internal]
int* begin();
^
<source>:2:14: note: used here
return r.begin();
^
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVE2P4zYM_TX0hZjAluKPHHzITDZob8VggaKnQpYZW7uy5EpUF_PvCznJdLKYwwYBY5ESH9_Ti1WMZnJEPdTPUJ8KlXj2oWezRO-mJ72uxeDHtx6a8vrV6wrlCcqjSuxxoMk4EF1egGhANBhAHBDa5-suRMRAnILDsLvvBnEAedsA7en2sEWmZbWKCeSLtipG_Aryy7WkvdO0Mr4qNxGCPGGgf5IJFBFE9xX5BowgjyCPdzC-omEGegfdolMLxVVpehw3ckia8fUxmz_GMYgjfkYjlx8QHmlFVmz03ypGCgyi2ziAfHnN7D6qcZf5uvyNAoF4wd9BtAt-S5GRw5txE7JHPZP-jjwT3pTJLJ3nOddNRKU5KWvfUCtrcy63_SBNU6IPOfn6mN3hX8SorXIT_lDBxVz-bDqQL9GnoCmTkMcqd6_2II_bMeOm_HhJTrPxDkG02SjOu7fFp4jv6m_88wAPc4gWZxWz5BScsmiN-64mwiFxJuc840gX42hEqJ-f_kzutny6H4H69OvXB_WXT0mJd07OZ1ceMUUacc4X82sG_9D6J_m2WIy9HA_yoArqq6Y9yLre79ti7vfdRaux6g5te6lEp8eyovowyG4U1UD7qjC9KIUsZY6yFe2uo2okSZ1qxbgfVAP7khZl7M7af5edD1NhYkzUN1XdNIVVA9m4_e-FcPQDtyIIkV8Doc9nnoY0RdiX1kSO_3dhw5b6P7xxbClG_Ez8uwXwEvxyN-jVsrFIwfYz87o5S5xBnCfDcxp22i8gzhno9vO0Bv-NNIM4b-NFEOdt_P8CAAD__zuYX5A">