<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 - Modules: Support umbrella modules with inferred submodule declaration in -frewrite-imports"
href="https://bugs.llvm.org/show_bug.cgi?id=39655">39655</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Modules: Support umbrella modules with inferred submodule declaration in -frewrite-imports
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Modules
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dblaikie@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>foo.h:
inline void foo() {}
module.modulemap:
module dot {
umbrella "."
module * { export * }
}
use.cpp:
#include "foo.h"
int main() { foo(); }
$ clang++ -fmodules -fimplicit-module-maps -fmodules-cache-path=cache \
-I . use.cpp -frewrite-imports -E -o use-rewrite.cpp
$ clang++-tot -fmodules use-rewrite.cpp
<module-includes>:1:30: error: submodule A.'foo' not declared in module map
#pragma clang module begin A.foo
^
While building module 'A' imported from use-rewrite.cpp:1:
In file included from <module-includes>:2:
/usr/local/google/home/blaikie/dev/scratch/implicit_modules_sample/./foo.h:2:22:
error: no matching '#pragma clang module begin' for this
'#pragma clang module end'
#pragma clang module end /*A.foo*/
^
use.cpp:1:29: fatal error: module 'A' not found
#pragma clang module import A.foo /* clang -frewrite-includes: implicit import
*/
~~~~~~~^
3 errors generated.
But without the inferred-submodule-declaration, this example compiles and
rewrites-imports correctly - similarly with an explicit sudmodule declaration
seems to work correctly too.</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>