<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98199>98199</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
missing diagnostic for reopening an ambiguous namespace
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zygoloid
</td>
</tr>
</table>
<pre>
```c++
namespace internal {
void Bar() {}
} // namespace internal
inline namespace stay_away {
namespace internal {} // namespace internal
} // namespace stay_away
namespace internal {
void Bar() {}
}
```
The final reopening of namespace `internal` should be invalid: lookup for the name `internal` is ambiguous. But clang accepts this and instead creates a second `::internal` namespace (a third `internal` namespace overall), and treats the two `Bar`s as being unrelated. (Ultimately this fails in IR generation due to a mangled name collision.)
Presumably we're incorrectly suppressing diagnostics in the lookup for the name `internal`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMk8-umzwQxZ_GbEYXgSEQFiySL4r07aqqXVcDnoBbYyOPSZQ-fWWS3kS3f24lK0Ga8Tm_ObaRWQ-WqBWbvdgcElzC6Hz7_To447RKOqeuraiy2-qF3MeVHUS2szgRz9gTaBvIWzQg6nsN4Oy0gj16IbdCNmulPtyKoj4ACHkU8gi_itx71l9tjbb01MQBr1_wgteH1R8w_sXjtz2vFs8gf5_1nWHvHz9DfNb9NBKcdJTz5Gay2g7gTk80ospeoasMeHSLUdBFjjMarUSxA-Pct2WGk_MQxltab_dpBpw6PSxu4RT2S4DeoB0A-57mwBDG2GEVaMuBUEHvCQMxIDD1zqooKIqdKHbPsk-ccotRxau31o8edyaPxgjZCPnf6haiC6_U4eLizhhilTEgQ0cxjcV6MhhIpdHjswl6wkDmekM-oTYM2sL_H2EgSx6DdhbUQhAcIExoB0PqlknvjNGsnU0jwtMpfPDEy4SducKFhKx9jLd33lMfzBV4mWdPzBFHaRys46D71TaSvx9_mqi2UE3RYEJtXstsUzalbJKxVVVXqkzVVVfmtZIZdVVZdFRRnm_7pqoT3cpMllmdNflWFmWdbrs8V40sZSk3m-KUizKjCbVJjTlPqfNDopkXaptt3jSJwY4Mr49bSksXWItCyvjWfRv3vHTLwKLMjObAD5Wgg6F20m_HXud8XFa0j4v1OOpk8aYdQ5g53pn1hQ06jEuX9m4S8hhd7n8vs3dfqQ9CHlc2FvJ4Yz-38kcAAAD__x-Teyw">