[llvm-bugs] [Bug 35395] New: [Modules TS] definition of X must be imported from module 'Y.<global>' before it is required

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 23 03:20:25 PST 2017


https://bugs.llvm.org/show_bug.cgi?id=35395

            Bug ID: 35395
           Summary: [Modules TS] definition of X must be imported from
                    module 'Y.<global>' before it is required
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: boris at codesynthesis.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

Created attachment 19459
  --> https://bugs.llvm.org/attachment.cgi?id=19459&action=edit
Reproducing script.

The attached reproducer causes the following unexpected error:

In file included from driver.cxx:1:
/tmp/repro/std.mxx:20:15: error: definition of '' must be imported from module
'mystd.<global>' before it is required
      fpos(): _M_state () {}
              ^
/tmp/repro/std.mxx:31:27: note: in instantiation of member function
'mystd::fpos<__mbstate_t>::fpos' requested here
        fpos<__mbstate_t> p;
                          ^
driver.cxx:6:6: note: in instantiation of member function
'mystd::basic_istringstream<char>::seekg' requested here
  is.seekg (0);
     ^
/tmp/repro/std.mxx:1:9: note: previous definition is here
typedef struct

Note that naming the struct fixes '' but does not get rid of the error. I am
also observing what appears to be related error (haven't come up with a
reproducer for it yet):

/home/boris/work/build2/libbutl/libbutl/standard-version.cxx:57:22: error:
declaration of 'strtoull' must be imported from module 'std.core.<global>'
before it
      is required
    uint64_t r (std::strtoull (b, &e, 10));
                     ^
/home/boris/work/build2/tests/modules/gcc/gcc-install/lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/8.0.0/cstdlib:245:22:
note: previous
      declaration is here
  using ::__gnu_cxx::strtoull;

-- 
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/20171123/9f17485c/attachment.html>


More information about the llvm-bugs mailing list