[cfe-dev] New warning for mismatched include case

Jason Haslam jason.haslam at gmail.com
Mon Jul 23 14:15:40 PDT 2012


Thanks Matthieu! Revised patch attached.

Jason



On Jul 23, 2012, at 10:56 AM, Matthieu Monrocq wrote:

> 
> 
> On Mon, Jul 23, 2012 at 6:16 PM, Jason Haslam <jason.haslam at gmail.com> 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?
> 
> Jason
> 
> There is a preprocessor directive to test for the presence of include files: __has_include I think.
> 
> #if __has_include(<IOSTREAM>)
> #  include <IOSTREAM>
> #endif
> 
> should make it so that the #include is only processed on file systems where <IOSTREAM> was found (which excludes case-sensitives file systems).
> 
> -- Matthieu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120723/f1a0602e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: include-case.diff
Type: application/octet-stream
Size: 5448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120723/f1a0602e/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120723/f1a0602e/attachment-0001.html>


More information about the cfe-dev mailing list