<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/79741>79741</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang c compiler QOL improvement
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Breadleaf
</td>
</tr>
</table>
<pre>
Hello 👋🏼
I made the mistake of coding a tad bit too late into the evening and issued the command: `clang main.c -o main.c` and found the hard way that clang does in fact let you issue that command. I know that this problem could be avoided with version management software and good coding practice, but I do think it might be a good thing to not allow (or at least prompt/have a flag to add a prompt) before over writing a given file. I tested this with gcc and found that it will not allow you to run `gcc main.c -o main.c`. (Also thankfully this occurred on a non essential project and I lost nothing of value...)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU8uugzgM_ZqwsS6CtLRlweI-hOZKI43mEwwxkLkhrhJD1b8fJXRe0mySKPGxj49PMEY7e6JONR-q-Spwk4VD9xEIjSOcioHNs_uFnGNQfaXaXrW1un28zrdefXyCqr5U9X6s37CiIZCFYLVR8IeAJxjZWD8DgqCBwQoIMzgUAuuFczTt5HOMN2Bj3Mjk65HXFb1Rp3dQl2p06GdY0fpyhDd-ndSlyrCJN3-gFgwGHvgEWVDgQBmmCNbDhKOAI4Enb0elV9RRqYRv-PH8OC5lsRHugQdHK4y8OQMDAe5sDRl4WFlgpxAte1jR40wreYHIkzwwUGY1M5u_BLgHHMWOpPQnDJvAN5jUvfU_YAVWOy-S8x-g9DCDMHgWQOf4AUrfOACmBjBKYrbeRel-wT3BJocZgMYA_v3awkATBwLeKcAjWDmGMdudPEzWUWpaKEoW3cajsXkc_yMrSiL5sM79i1ASURjC5tN8EuR_plMm3u8upl7R_0ybc8-jEI_jFgIZYA8Inj1QjOTFokv0_6BRModvcBwl1c2a8AQ7uo3KslS6LUx3Mu2pxYK6-lpdzid9O-ti6ZqpqapzM15qqpvrbbhcbm1T6fo8XHVDlSlspyt9rmp9q9rqqnWZttGYSde1blrdqHNFK1pXOrevJYe5yI7pru31XBcOB3Ix_x2ts8uU1ukbhS7Fvw3bHNW5cjZK_CeDWHHUfWZTjsl2d-sowO-__Qp2vQfes4mKLbhuEblHdXpXule6n60s21COvCrdp3Sv7e2llNJ9ZheV7jPBPwMAAP__969Ljg">