[llvm-bugs] [Bug 38392] New: Missing "export *" results in bogus error with forward-declared enum
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jul 31 11:33:30 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38392
Bug ID: 38392
Summary: Missing "export *" results in bogus error with
forward-declared enum
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Modules
Assignee: unassignedclangbugs at nondot.org
Reporter: jordan_rose at apple.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Created attachment 20625
--> https://bugs.llvm.org/attachment.cgi?id=20625&action=edit
Self-contained test case
I think we've decided modules without `export *` aren't that interesting, but
nonetheless they shouldn't produce bogus errors. Given this (valid) Objective-C
header:
// <Base/Base.h>
enum Foo : int bar;
enum Foo : int {
FooA,
FooB
};
If it's included in module Base, and module BaseUser imports Base but does not
re-export it, Clang produces an error on the first line.
./Base/Base.h:1:16: error: definition of 'Foo' must be imported from module
'Base' before it is required
enum Foo : int bar;
^
./Base/Base.h:3:6: note: previous definition is here
enum Foo : int {
^
I didn't check whether C++ modules have the same problem.
--
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/20180731/867fc346/attachment-0001.html>
More information about the llvm-bugs
mailing list