[llvm-bugs] [Bug 52281] New: Non-exported aliased type used through exported type alias is not reachable

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 24 09:07:35 PDT 2021


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

            Bug ID: 52281
           Summary: Non-exported aliased type used through exported type
                    alias is not reachable
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: compile-fail
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: johelegp at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    johelegp at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

See https://godbolt.org/z/qzd1aaqP3

mod.cpp:
```C++
export module mod;
struct t { };
export using u = t;
```

test.cpp:
```C++
import mod;
int main() {
  u v{};
}
```

Output:
```
test.cpp:3:5: error: definition of 't' must be imported from module 'mod'
before it is required
  u v{};
    ^
mod.cpp:2:8: note: definition here is not reachable
struct t { };
       ^
```

With templates: https://godbolt.org/z/81f3ocjfW.

-- 
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/20211024/8ebc2eb0/attachment.html>


More information about the llvm-bugs mailing list