[llvm-bugs] [Bug 39655] New: Modules: Support umbrella modules with inferred submodule declaration in -frewrite-imports

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 13 17:41:49 PST 2018


            Bug ID: 39655
           Summary: Modules: Support umbrella modules with inferred
                    submodule declaration in -frewrite-imports
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dblaikie at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

  inline void foo() {}

  module dot {
  umbrella "."
  module * { export * }

  #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:
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.

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/20181114/fe90b5c9/attachment.html>

More information about the llvm-bugs mailing list