<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 - clang++ chockes on modules when specifying c++20"
href="https://bugs.llvm.org/show_bug.cgi?id=49771">49771</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang++ chockes on modules when specifying c++20
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++2a
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mattias.l.sk@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>I have a program for prescanning source files. That program invokes
```
clang++ -std=20 ..include flags.. source.cpp -E > output
```
Say that i have a file called source.cpp:
```
import x;
```
Then when trying to expand it with -E i get an error that "module x is not
found". That seems to be a bug. Surely the lookup of modules does not need to
be performed to be able to expand the macros of a file?
This problem is only present if you specify the c++ version to be 20, and not
for example 17. My guess is that this makes modules enabled.
If this is not a bug, how do you expand macros in a file without getting a
error for imports?
tested with clang++-11 and clang++-12</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>