[cfe-dev] New warning for mismatched include case

Chris Lattner clattner at apple.com
Tue Jul 24 14:56:29 PDT 2012

On Jul 24, 2012, at 12:40 PM, Jason Haslam wrote:

> On Jul 23, 2012, at 7:00 PM, Chris Lattner wrote:
>> On Jul 23, 2012, at 9:16 AM, Jason Haslam wrote:
>>> This updated patch adds a fixit and a test. The test fails on case-sensitive systems. Is it possible to test for an error on some platforms and a warning on others?
>> Very cool, it would be really great to get this warning.  However, there is high risks of slowing down compile times here, have you done any analysis of the compile-time cost of this?
> I have done some performance testing. I see less than 1% slowdown over parts of LLVM. For example, I build the LLVMSupport library repeatedly until the build time becomes more-or-less consistent. Then do the same thing with the warning enabled. I don't know if there's a better way to test this.

This is with the warning enabled, right?  I haven't looked closely at the implementation yet, but you're doing entire directory scans to resolve the original case.  I'm not aware of a better way to find the original case, but this is very delicate.  It is not uncommon to include hundreds of headers in dozens of different directories.


More information about the cfe-dev mailing list