<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/71003>71003</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang driver seems to treat `.s` file extension as `-x assembler-with-cpp` instead of `-x assembler`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
rapidsna
</td>
</tr>
</table>
<pre>
According to https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Driver/Types.def#L78 and https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Overall-Options.html, it seems `.s` should be treated as `-x assembler`, but it seems the driver treats `.s` as `-x assembler-with-cpp`.
Steps to reproduce:
```
touch empty.s
clang -### empty.s
```
The output contains "-x" "assembler-with-cpp".
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU01vnDAQ_TXmYoHMmGXZA4c0EadKOTR_wB-ziyuvjexxmvz7CtgqH41UVbIG7PF7zMx7qJzdJSCO7PCNHR4qVWiOaUxqcTYHVeloX8c7Y2KyLlw4RT4TLZnJOwYTg-niaC66MfHKYPL--c-jXlL8iYYYTNpHzWC6KhcYTMarcGEwuWB8sfju5CG5Z0wMpqfXBXNj8cxAfj8OXAXLP3_WmOYSShPTiozBu4A2mryn6rZt2kbsGwbT4zMm5X39uJCLITczXT2De-6IZ8Rr5qwXTWa94HmOxVuukVNCRWi52rL1C1c541V7TKwXK1gXeiOgGbnd6t-B7yj_Jqh_OZprsyzrHSYemLjb4w_CJa8zTrikaIvBteH9Qi9ua9tSLGbmeF3otcn70TZGXjOQ-_qY_YTf49OMPBZaCnETAykXMmcA9QsDWF--qBjgQ8V7rOwo7UmeVIVj25-GYYDTsavm0WhzwE4L3UvbHXWvjJJHDRa0sZ3UQ-VGECDbVrQgD33bNfI4DKcztK3pu94OknUCr8r5ZjXVKnflci44HlshZOWVRp837wLcfASrjdO4mVCXS2ad8C5TfmMgRx7H-21eN9FuKsZdvTfxzs4jxxfCkF0M_9CSu5AJleXx_IVnqpL8-N8_z9btauut4d8BAAD__whjJko">