[cfe-dev] New warning for mismatched include case

slide.o.mix slide.o.mix at gmail.com
Wed Jul 18 15:31:05 PDT 2012

On Wed, Jul 18, 2012 at 3:12 PM, Jason Haslam [via Clang Developers] <
ml-node+s42468n4025512h84 at n3.nabble.com> 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:
> jason$ ls
> test.cpp test.h
> jason$ cat test.cpp
> #include "Test.h"
> jason$ clang++ -fsyntax-only test.cpp
> test.cpp:1:10: warning: include case does not match the case of the file
> on disk
> #include "Test.h"
>          ^
> 1 warning generated.
> What do you think? Is this desirable? Does the direction look right?
> Jason
> _______________________________________________
> cfe-dev mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4025512&i=0>
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> *include_case.diff* (2K) Download Attachment<http://clang-developers.42468.n3.nabble.com/attachment/4025512/0/include_case.diff>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
> http://clang-developers.42468.n3.nabble.com/New-warning-for-mismatched-include-case-tp4025512.html
>  To start a new topic under Clang Developers, email
> ml-node+s42468n42468h20 at n3.nabble.com
> To unsubscribe from Clang Developers, click here<http://clang-developers.42468.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=42468&code=c2xpZGUuby5taXhAZ21haWwuY29tfDQyNDY4fC0xNjA2NzUzMDEz>
> .
> NAML<http://clang-developers.42468.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

There are times when I would REALLY love to have something like this.
People in my group never take this into consideration and so I have to go
back through our entire source code and modify things to get them to build
on Linux.


Website: http://earl-of-code.com

View this message in context: http://clang-developers.42468.n3.nabble.com/New-warning-for-mismatched-include-case-tp4025512p4025517.html
Sent from the Clang Developers mailing list archive at Nabble.com.

More information about the cfe-dev mailing list