<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/96257>96257</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
-Wnonportable-include-path may be broken on Windows
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Alcaro
</td>
</tr>
</table>
<pre>
```c++
#include "EXAMPLE.H"
#include "example.h"
#include <WINDOWS.H>
#include <windows.h>
#include <STDIO.H>
#include <stdio.h>
```
with example.h being an empty file.
No flags needed, but must be on Windows. mingw and cl modes are both fine.
Expected: Warnings on the three caps names, because they should be lowercase.
Actual: Warning on lowercase example.h, because it thinks the file's real name is what it was first opened as, ignoring its actual name on disk. No warning on either windows.h name (possibly related to #57931). The stdio.h warning is correct.
Unfortunately, Godbolt only offers Clang on Windows up to Clang 16, so I can't check whether this has been fixed since then. (They're using Windows Server 2019, if it helps.) https://godbolt.org/z/doocPhzW9
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0VF9vozgQ_zTmZRQEJgnhgYds09xWuuuu1J5yrwYP2FdjI48pzX76k0n6Z0-tZIFg_Psz88MIIt1bxJptvrHNIRFTUM7Xe9MK75LGyXPNttlltYx_iys7sGzPeKFtayaJwDi__Wf_188_b9PvjPPP6vgihtFgqj6tFzenu_vDj9ND-p0Vt5_VZ22lmylVX9QfHg93P75EU5DafcS-dnR5nHVQ8OYQGtS2B2EBhzGcodMG0ytuud476IzoCSyiRMn4DTRTgGGiAA2Cs3C6uoVB234GYSW0BgYnkUB4hMYFBZ22v_PevozYBpSs2MNJeKttT5EtKISgPCK0YiSwYkBaRLEVE8UanoGUm4yM-sbN6FtBr-T7NkzCfCCNnG-b4EMy75Q6QFDaPtEiHifAeEngUZhFHzTBrESIG2dB0GlPAdyIFiWIxZ3urfNRTQcCsXi4QJ0FqekphXsH87sj1EGhh7egL5sZ342OSDfmDB6NCCghOGC82JRVkTNepfCoEK4JvxFqgtZ5j234bcR_2875MFkR0Jyjyz-cbJwJ4Kw5g-s69AQ3RlwsXWOEaYyal9f5NsLIwR20wjJeBmgVtk8wK1waCEoTKEHQIFro9AtKIG3bJSebxo4eFZ4ZLz3CRNHsq84D-mf0wLO8WibYxfEqNCOljFegQhiJFXvGj4wf-4vz1Pme8eMvxo_Sufan-nWqElkXsioqkWCdl_mu4lW5qxJVC1HtsJRNs26kEHnRlNt8k2MuSuw2G7FOdM0zvs62PM8yXq2rdLtDmWdF0fBOynWZs3WGg9AmNeZ5iNqJJpqwrrZ8UyZGNGho-ZVwbnGGpRiP_OaQ-DpiVs3UE1tnRlOgd5agg8F6dbLOjs4H0RhcXQ_wahRBwSDO8eNuvHtC-yGcZPKm_t9kdFBTk7ZuYPwYFa631ejdv9gGxo-LL2L8ePH9XPP_AgAA___hS58X">