<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - Header maps and #include_next don't work well together"
href="https://llvm.org/bugs/show_bug.cgi?id=27121">27121</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Header maps and #include_next don't work well together
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.8
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>cjhopman@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=16123" name="attach_16123" title="repro">attachment 16123</a> <a href="attachment.cgi?id=16123&action=edit" title="repro">[details]</a></span>
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.</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>