New warning for mismatched include case

I apologize for the delay. I think that it should be fairly trivial to detect which headers come from the SDK by looking in the registry for the path to the SDK. Maybe clang already supports this somewhere? I'm not very Windows savvy myself but I'm willing to take a crack at this if nobody else steps forward with more specific information.

This is unacceptable for MinGW, which uses no registry, but the same header names (but obviously different implementation). The MinGW(-w64) headers are all lower-case, some of the Windows SDK headers are capitalized. There is no way to detect the difference, and there is no "right" capitalization for these.

This feature also has an effect on cross-compilation, where a Linux to Windows cross-compile will work case sensitive, a native Windows compile will not.

Ruben

It /is/ a warning, not an error. Maybe it can be off by default on Windows

This will effectively limit it to Mac OS X.

and on case-sensitive filesystems?

Out of curiosity: how do you detect FS case-sensitiveness?

I apologize for the delay. I think that it should be fairly trivial to detect which headers come from the SDK by looking in the registry for the path to the SDK. Maybe clang already supports this somewhere? I'm not very Windows savvy myself but I'm willing to take a crack at this if nobody else steps forward with more specific information.

This is unacceptable for MinGW, which uses no registry, but the same header names (but obviously different implementation). The MinGW(-w64) headers are all lower-case, some of the Windows SDK headers are capitalized. There is no way to detect the difference, and there is no "right" capitalization for these.

This feature also has an effect on cross-compilation, where a Linux to Windows cross-compile will work case sensitive, a native Windows compile will not.

Ruben

It /is/ a warning, not an error. Maybe it can be off by default on Windows

This will effectively limit it to Mac OS X.

Hm. Yes. I guess the user header vs. system header heuristic is better. But there seems to be no reason not to have this on for system headers on OS X, where capitalization has been fairly stable.

and on case-sensitive filesystems?

Out of curiosity: how do you detect FS case-sensitiveness?

Without writing to a file, or requesting a file with known incorrect case and then checking the inode, I have no idea. :wink: But we'd only have to do that once, and as I read the patch now we'd be doing it on every user include even if the filesystem is case-sensitive.

Don't forget that the case sensitiveness of NTFS is configurable, and
that there may exist third party filesystems and network filesystems
with their own particular case affinity.

It's not always restricted to Windows either, I ran into case problems
with VirtualBox's vboxsf driver from Linux, where Git assumed that as it
was on Linux, it could expect case sensitivity.