<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - -fixit changes file casing for 'nonportable-include-path' warnings"
   href="https://bugs.llvm.org/show_bug.cgi?id=46024">46024</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-fixit changes file casing for 'nonportable-include-path' warnings
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>duncan.horn@utexas.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>For example, if I have the following three files:

main.cpp:
```
#include "a.h"
int main() {}
```

A.h:
```
#pragma once
#include "b.h"
```

B.h:
```
#pragma once
#include "a.h"
```

In the above, both A.h and B.h are capitalized, however all three files include
each other using lowercase characters. Building this correctly gives
'nonportable-include-path' warnings suggesting that the includes be
capitalized. If I pass '-Xclang -fixit' as a compilation argument, these
include statements correctly get updated to be uppercase, however when it goes
to save the new contents of A.h and B.h, it lowercases both filenames. I.e. to
a.h and b.h respectively. Now if I build, I get the 'nonportable-include-path'
warning again, but this time suggesting that the include statements be made
lowercase since that's now what the files are named. If I again run with
'-Xclang -fixit', the includes get "fixed" to be lowercase, but the files are
now saved with capitalized file names. Rinse and repeat.

Seems as though spelling of the include directive is influencing some cached
file name that persists all the way up to saving the file on disk.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>