<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/55972>55972</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Interpreter][clang-repl] Can't redeclare if we type the decl in a wrong way and it's not first repl
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
junaire
</td>
</tr>
</table>
<pre>
In clang-repl, you can redeclare a variable or function if you previously type the decl incorrectly, like the screenshot below:

However, it only works **if it's the first repl**, if you have already given some input to clang-repl (whatever), it will give you a redefinition error, which is wrong, because the previous decl is not parsing correctly!

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1U81uozAQfhq4WERgMJgDhzZVtX2MASbg1rGRbYJ4-x2cRk2155WswTD2zPcz9Hbcuw_DBg1myhwuOuFnttuVDWCYwxEp45ABu4FT0Gtk1rHLaoagrGHqEs8uDm_Krl7vLOwLsjAjO24yZQbrHA5B70ddrb7uST84RONnG1iP2m5J-ZLkb0n-iLxIxKu6woSJeEu4nENY_HGIv9NaPbosZv1pUmFe--PLYE1AE06DvdKZphFcFJWgbdHwVuZ5WWbjUBRFK6usqkeRVWVVZn3d8wxAUmKUJTTytJgp4e0vODH-sRve0B08VGDWENnNui_PEk64XkgKFRLe-EjwopwP7K7nS1znh1gz3EhP7RDGnU3qhoZ5e0XSalkDC_bJCyottxnCvW_73XpTWseLsRxEly7KqOgIOmcjxm1Ww8yUZ5uzB6MzKT0ACRXxPRz7tskzQ1Ys4LwyE3vyrPjftvCmyspGVo2sIUNxybNKyDyTbXPJ2rLk-QDVKJH_siUdu3JsyxbSoILGjlB9UBdHrCge2MTr00SLN3YGQ96Ep4kmNzb8Z1xJzqgX22BnYMaHp4c8P56mq9Pdb_J3wt8stb49Htni7CeJSa_K-xU9bYRoG57O3ciJdD3yRrZtjTj2g5BQF1yWOYx9U6Ua6O_wB72E834lATiRSVXHc87zushzXrWVOGFzKXpoa5AoCuwhqXK8gtKnA8HJuil1XQRDNTwltfLB_yTBezUZjDoe9WENs3Xd52pAOUwj7i6C_gskC1YW">