https://llvm.org/bugs/show_bug.cgi?id=27121
Bug ID: 27121
Summary: Header maps and #include_next don't work well together
Product: clang
Version: 3.8
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 16123
--> https://llvm.org/bugs/attachment.cgi?id=16123&action=edit
repro
If I have a command like:
clang++ -I map.hmap -I map2.hmap -I . foo.cpp
and map.hmap and map2.hmap point to paths relative to '.', clang will act like
it found the files in '.' rather than in the header map. Then, #include_next
will continue searching from '.' instead of from the header map. A file in
map.hmap then cannot include_next a file in map2.hmap.
I've attached a simple repro.
This is not just a problem when using multiple header maps. If the command were
clang++ -I map.hmap -I some/include -I . foo.cpp headers mapped in map.hmap
(relative to '.') would not be able to include_next a file in some/include. In
this case, I could reorder the includes so that it works correctly, but in the
multiple header maps there is no reordering that would work.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs