[llvm-bugs] [Bug 27121] New: Header maps and #include_next don't work well together
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Tue Mar 29 16:06:17 PDT 2016
    
    
  
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: unassignedclangbugs at nondot.org
          Reporter: cjhopman at gmail.com
                CC: llvm-bugs at lists.llvm.org
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160329/c2d8d6d5/attachment.html>
    
    
More information about the llvm-bugs
mailing list