[llvm-bugs] [Bug 52293] New: Importing header units makes macros usable

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 25 07:15:41 PDT 2021


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

            Bug ID: 52293
           Summary: Importing header units makes macros usable
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: accepts-invalid
          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/sxrdc474h.

mod.cpp:
```C++
export module mod;
export import <cstddef>;
```

test.cpp:
```C++
import mod;
struct X { int x; };
int main() {
  static_assert(offsetof(X, x) == 0);
}
```

-- 
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/20211025/184b81cf/attachment-0001.html>


More information about the llvm-bugs mailing list