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

    <tr>
        <th>Summary</th>
        <td>
            clang-cl ignores -imsvc flag (also /imsvc) when -nostdinc is specified 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    I am using LLVM 14
It seems that clang-cl doesn't properly parse system header directories passed using `-imsvc` nor `/imsvc` when `-nostdinc` is specified in the compilation command-line.
The following warning is emitted:
```
clang-cl: warning: argument unused during compilation: '/imsvc C:/My/Include/Dir' [-Wunused-command-line-argument]
```
And the headers contained in the system directory are not found
To work around the problem I had to do:
```
-Xclang -internal-isystem -Xclang C:/My/Include/Dir
```
 However I would expect that I should be able to override the standard includes and that my system includes shall be treated as system headers even if I don't want the default include directories.
I believe this behavior should be considered a bug
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1VMFu2zAM_Rr7QjhwlNh1Dj50K4oFaG_DtitlMbE2WQokOVn-fpQdZy3QAkZMkxT5-PQY6dS13QMOMAZtj_Dy8uMV1tusfMrKx32EQDQEiD1G6AzaY9EZUI6CzcRDhJN3J_LmCif0gSBcQ6QBekJFHpT21EXnNQWOh0Dq1iOry0IP4dyxAdb55MjE89116clOSdaFqLSdnDpAOFGnD5rraMuQCDo3nLTBqJ1N9oBWFUZbWs3wv3PKwRnjLqnrBb1Nby5Eg46RVLZ5nBNT__mZPpdBOb6cSib64ziQjTDaMQ2jRp_qvQGRspiXZRb4mjqI59cr_-xtZ0ZFbD1pz0mQVV-Kn3Op4i34YumTVU8fwnu0app-pjkwABuRD95puV3Dwv-VkRPzHJmM0aobNw4uzv_hUPJNx_gypeFze-iRPY7v-TOGil8TR1BoG8lbNIW-NV0in4_-UT345i50Zs3sGdVoFNBfvus4624PoZ-ckgAZYYLmONlrRfO8kblDn-afGgXAaSQ-O1wXNu6x0KMxqVb0hKwCwPBeuKyPMwtQH7izcrPQL2jj1EvRAUcTl3JvRX5T3Z5rG80lOJ-1JqnHs2aR_x-CLywwdp96gxyPObXruq5Fs32odrlqN2q32WEedTTU3rdOH3lVGP-8OnAwyJskGjTBwX17xG7envvqvN-bfPSm7WM8hfl6-Dnq2I9yxQrkD2POy6tgOfzm0VLpEEYKbFRNVVZ53zaCarleb2RTStEoIZqyqdRhK9dyJ6tDlRtkDkLLEs-EsHSBqQTbrOlct6IUYl2Kcl1XYtOsJCLKpkZs6u2m25TZtqQBtVklHCvnj7lvJ0jMVeCg0SGG_0H-a2FuiKZ2XB_H2DvfnkKH0sV8at1O0P8BBuCgng">