<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/101279>101279</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang-tidy] Why is there no warning when I use the redundant-declaration option?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Zhenhang1213
</td>
</tr>
</table>
<pre>
When I declare two variables, there is no warning. When I extern, there is a warning. This is different from gcc.
Is this some kind of special consideration?
https://godbolt.org/z/9rePocxo3
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxckUGPmzwQhn-NuYyC8BjCx8GH_TZC2lsPlVbqbcADuHXsyDbJpr--IkSK2gtI9vvanuehlOzsmbVo_hfNqaA1LyHqHwv7hfwsUapiCOauPxf28AGGR0eRId8CXClaGhwnge-QF44MNoEPcKPorZ9LeJb4K3P0f6XoFfq-2LQtGTtNHNlnmGI4wzyOpahOonr7SJC3TApnhl_WGwgTpAuPlhyMwSdrOFK2wQvV75X9u-R8SUK9CewF9nMwQ3C5DHEW2P8W2HeRv4XxK6jCaGU61VHBWraIqlNKymLRDbWmov8ktsdu6FRtzHCUZI4jHbupwqawGiusq1bJClUjZUndNDXtVJPBrm6NEnXFZ7KudO563u4ubEora1lJbLvC0cAuPegjjo78fMjW3AXiZiPqrXUY1jmJunI25fQ6J9vsHt7eX7XmBJ_LfaO5k37JgNvuYk287UFks3pDPh92pQ9-EC5PjMUanf6Hn83LOpRjOAvst1c8f4dLDD95zAL7x2hJYP-c7qrxTwAAAP__Gd_GOw">