[cfe-dev] New warning for mismatched include case

Sean Silva silvas at purdue.edu
Mon Jul 23 14:59:30 PDT 2012


Please make sure that Michael Spencer (CC'd) has reviewed this before
it goes in. He has tried to implement this before and it turned out to
be nontrivial to do correctly.

--Sean Silva

On Mon, Jul 23, 2012 at 2:26 PM, Jason Haslam <jason.haslam at gmail.com> wrote:
> Hi Sebastian,
>
> 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.
>
> Jason
>
>
> On Jul 19, 2012, at 5:14 AM, Sebastian Redl wrote:
>
>> On 19.07.2012 00:09, Jason Haslam wrote:
>>> The attached (incomplete proof-of-concept) patch provides a new warning that fires on case-insensitive file systems when the case of the file name in the #include directive doesn't match the case of the file name on disk. The idea is to avoid broken commits that fail to build on case-sensitive file systems. For example:
>>>
>>> What do you think? Is this desirable? Does the direction look right?
>>>
>> There would need to be a whitelist mechanism for some headers, I think.
>> I'm pretty sure the WinSDK headers have changed casing over time, so I
>> would want to suppress this warning for windows.h. I would not want to
>> have to change code just because I installed a new SDK.
>>
>> Sebastian
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list