<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Missing "export *" results in bogus error with forward-declared enum"
href="https://bugs.llvm.org/show_bug.cgi?id=38392">38392</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Missing "export *" results in bogus error with forward-declared enum
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Modules
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jordan_rose@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=20625" name="attach_20625" title="Self-contained test case">attachment 20625</a> <a href="attachment.cgi?id=20625&action=edit" title="Self-contained test case">[details]</a></span>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>