https://bugs.llvm.org/show_bug.cgi?id=46024
Bug ID: 46024
Summary: -fixit changes file casing for
'nonportable-include-path' warnings
Product: clang
Version: 10.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
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.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs