https://bugs.llvm.org/show_bug.cgi?id=39682
Bug ID: 39682
Summary: frewrite-imports not usable with umbrella directory
declarations
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Modules
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
foo.h:
// empty
use.cpp:
#include "foo.h"
// empty
module.modulemap:
module A {
umbrella "."
module * { export * }
}
$ clang++ -fmodules -c -xc++ -Xclang -emit-module -fmodule-name=A
module.modulemap -o A.pcm
$ clang++ -fmodules -fmodule-file=A.pcm use.cpp -frewrite-imports -E -o x.cpp
$ clang++-tot -fmodules x.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 x.cpp:1:
In file included from <module-includes>:2:
././foo.h:1: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.
Richard mentioned that the expectation is that the modulemap written to the
rewrite-imports output file should contain the "module * { export * }" expanded
across the files, so it no longer contains the * globs.
For example, if the x.cpp is manually modified, replacing "module * { export *
}" with "module foo { export foo }" this does produce a file that
parses/compiles without error.
--
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