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

    <tr>
        <th>Summary</th>
        <td>
            Clang could warn about trailing spaces in `#include` filenames
        </td>
    </tr>

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

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

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

<pre>
    Consider:

```
#include "foo.h " // Note: trailing space.
```

Assuming `foo.h` exists, the code above will compile on Windows whose filesystem API generally ignores leading and trailing space in filenames. However it will not compile on stricter systems such as Linux.

Maybe Clang should warn? It's niche, but also seems easy to do.

(Yes, we hit this in real code, https://chromium-review.googlesource.com/c/chromium/src/+/5641197)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxskkFv2zwMhn-NfCFq2Izj1Acf0hbBV-DbsNuwoywxtgZZDEQ5afbrBzld1xYDDNqGSL7iy0eLuDEQ9Wr7oLZPhV7SxLH_NbOluRjYXvtHDuIsRbXZq-pJVX9iW70-t1_cuGD8YgkU4pG5nPIHKDwoPMBXTqQ2e0hRO-_CCHLShsp_t1rjXmSZc6Zqq7WdaiugFydJFD5CmggMWwI98Jng4rwHw_PJeQIO8N0FyxeBy8RCcHSe5CqJZth_e4aRAkXt_RXcGDiSgCdts5YO9tMVwYW1POiZpIT_-EJniuDSTTJwei8rKTqTKMJNTUAWM4EW-N-F5aV8P98XfR0IHr3OShMv3sJFx6A2B3hOCncCwZmJ8qzDkkB7YRDKPUnLFRKD5Q8NFd7_oNWbC8HkEqTJSb5-JO1Xr_LZlNJJ8irXvZgp8uyW-S7S2dGlHJlHT8JLNFQannPKuzSFB4lmLX1QeNi2TV13O4VdYfuN7TadLqivd_X9ruvaBoupP5ojHqvK1LjNUXdkzU43NeoOzbG-L1yPFTZVW3c1YtVU5dHu9GCoHXSNnRmsaiqatfOl9-e55DgWTmShvmurtim8HsjLSi-iyWaqzd46PQaW5IwoxIx17HP13bCMoprKZ4j-9ksueepvmzBvi8hgLekTDaufGdQ32jOVb3wUS_T9R4dHl6ZlePUyS76-7k6Rf5JJCg_rPKLwcBvp3OPvAAAA__-MtSdU">