<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/104347>104347</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang][driver] -S and -c are incompatible after #101103 when using Werror, even without -fsyntax-only 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ilovepi
      </td>
    </tr>
</table>

<pre>
    After https://github.com/llvm/llvm-project/pull/101103, `-S` and `-c` options seem to be incompatible when using -Werror. This doesn't seem to be intentional, from what I can tell.

The following program results in `clang: error: argument unused during compilation: '-c' [-Werror,-Wunused-command-line-argument]`
```
touch foo.c
~/llvm-project/build/bin/clang -S -O0 -Werror  -c .foo.c -o foo.c.o
```

CC: @MaskRay 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU82OpCwUfRrc3GAQRasXLqqrUsm3-DLJdCe9RkBlBsHwUzW1mWefoF3zv5nEgNd4zzn3cOAh6Mkq1SP2jNi54CnOzvfauKtadTE4ee-PY1Qe5hjXgOojohdEL5OOcxpK4RZEL8ZcHxtevfukRET0siZjEL1UpKpIjegJUEvwC2oJcCu3QuTCrVE7GyAotUB0MCjQVrhl5VEPRsFtVhZS0HYC_Ka8d76E11kHkE4Fi2gXf22NymZAbjLl6N0Ct5lH-A8EtxCVMSUiZ0SO-_o6KxidMe6WCVbvJs8X8CokEwNom3UKw-2E6iNs7PmF-yktykZINgUlQSaf27NqbXimz38h2mGBaAeIPb9LR_SE3_YmLNyycCux0VbhByJiZ9SSd4UteX-2MrokZhidK8X-4eufng9JG5l3bRG9bMIBvwD-QB7mAWAB5YYC2O1wpfsr4b6eTtssDfmfh88f-R0K2dfyqX7iheqrjtbtgbKuLea-apuKdV0tD4zRjlaHQ3Oo61EKJWXXsLHQPSW0IYeKEdJQ1pZyGMfhSchRjF1DqhE1RC1cmzKPVTo_FTqEpPqKNHXTFYYPyoQtqpTup0JpTq3vNx-GNAXUEKNDDD8goo5my_fewc6IPUuvr8ojds7u5DhiAdz_ljy-5R7Reo_wz0n8fpqgrsrCTcfZpQh4DHcb-RfsrLlDkbzp__nabBOH7eJsQ197-i0AAP__B04mAA">