<div dir="ltr">Reposting this to the list (replied to sender by mistake):<div><br></div><div>Jonathan Coe:  <span style="font-size:13px">I wonder if a clang-tidy check might be a good place for a more exhaustive check?</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Eric N: </span><span style="color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:14px">That's not a bad idea, thanks. I would still like to leave this simple check in to catch the majority of the cases, since not everybody uses clang-tidy. Do you have thoughts on the patch?</span></div><div class="" style="margin:2px 0px 0px;color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:14px"></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 April 2016 at 19:49, John Sully via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Out of curiosity have you tried this with some of the more interesting upper/lower case pairs like the turkish '<code>İ</code>'?  <br><br>It sounds like the way you're achieving this should allow this to work, but its worthwhile to try it.<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Apr 7, 2016 at 11:37 AM, Chris Lattner via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div style="word-wrap:break-word"><span><br><div><blockquote type="cite"><div>On Apr 5, 2016, at 4:03 PM, Eric Niebler via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:</div><br><div>



<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>
<div>Hi all,</div>
<div><br>
</div>
<div>I have an initial cut at patch that issues a warning when a file is #included on a case-insensitive file system that would not be found on a case-sensitive system. Is there interest?</div>
<div><br>
</div>
<div>Since this is a hard problem to solve perfectly, I have opted for a strategy that is efficient and conservative about issuing diagnostics. That is, it shouldn't give false positives, but it will fail to diagnose some non-portable paths. On *nix systems,
 the low-level APIs that stat and open files get an extra call to ::realpath, and the result is cached along with the rest of the file metadata. On Windows, I use a combination of GetFullPathName and GetLongPathName to get the same effect. (I don't believe
 that's guaranteed to get the physical name including case, but it seems to mostly work in my testing.)</div>
<div><br>
</div>
<div>Due to how I compare path components, a relative path like "NoTtHeRiGhTcAsE/../correctly-cased.h" will not be diagnosed, but "../NoTtHeRiGhTcAsE/correctly-cased.h" will be. Catching more cases requires many more round trips to the disk, which I wanted
 to avoid.</div>
</div></div></div></div></blockquote><br></div></span><div>Hi Eric,</div><div><br></div><div>This would be a hugely welcomed feature, but have you done any performance analysis of this?  The preprocessor and the data structures you are touching are very sensitive.</div><div><br></div><div>You can stress test the preprocessor by using the "clang -cc1 -Eonly” mode.  If you’re on a mac, I’d recommend timing <Cocoa/Cocoa.h></div><div><br></div><div>-Chris</div><div><br></div><br></div><br></div></div><span class="">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></span></blockquote></div><br></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>