<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 - [modules] ICE in diagnoseQualifiedDeclaration after "export b::a""
href="https://bugs.llvm.org/show_bug.cgi?id=45962">45962</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[modules] ICE in diagnoseQualifiedDeclaration after "export b::a"
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>arthur.j.odwyer@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23500" name="attach_23500" title="/var/folders/0l/9t0yv2890_g4wgmy53n_mg7w0000gy/T/test-b61954.sh">attachment 23500</a> <a href="attachment.cgi?id=23500&action=edit" title="/var/folders/0l/9t0yv2890_g4wgmy53n_mg7w0000gy/T/test-b61954.sh">[details]</a></span>
/var/folders/0l/9t0yv2890_g4wgmy53n_mg7w0000gy/T/test-b61954.sh
<a class="bz_bug_link
bz_status_NEW "
title="NEW - [Modules TS] Diagnose qualified declaration fails on exported class"
href="show_bug.cgi?id=39081">Bug 39081</a> might be related.
cat >test.cpp <<EOF
namespace b {
export b :: a;
EOF
clang++ -std=c++20 -c test.cpp
test.cpp:2:1: error: export declaration can only be used within a module
interface unit after the module declaration
export b :: a;
^
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /Users/aodwyer/llvm-project/build/bin/clang++
-std=c++20 test.cpp -c
1. test.cpp:2:14: current parser token ';'
2. test.cpp:1:1: parsing namespace 'b'
0 clang++ 0x00000001025f1a45
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 clang++ 0x00000001025f0918 llvm::sys::RunSignalHandlers() +
248
2 clang++ 0x00000001025f1018
llvm::sys::CleanupOnSignal(unsigned long) + 216
3 clang++ 0x000000010253e52d CrashRecoverySignalHandler(int)
+ 189
4 libsystem_platform.dylib 0x00007fff74fb9b5d _sigtramp + 29
5 libsystem_platform.dylib 000000000000000000 _sigtramp + 18446603338553517248
6 clang++ 0x00000001027a84c8
clang::Diagnostic::FormatDiagnostic(char const*, char const*,
llvm::SmallVectorImpl<char>&) const + 968
7 clang++ 0x0000000102e2735d
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 93
8 clang++ 0x00000001027ad8ee
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 862
9 clang++ 0x00000001027a7fc9
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 89
10 clang++ 0x0000000103b80bef
clang::Sema::EmitCurrentDiagnostic(unsigned int) + 351
11 clang++ 0x0000000103cf07f2
clang::Sema::diagnoseQualifiedDeclaration(clang::CXXScopeSpec&,
clang::DeclContext*, clang::DeclarationName, clang::SourceLocation, bool) +
3170
12 clang++ 0x0000000103ceefee
clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&,
llvm::MutableArrayRef<clang::TemplateParameterList*>) + 1998
13 clang++ 0x0000000103cee7ab
clang::Sema::ActOnDeclarator(clang::Scope*, clang::Declarator&) + 27
14 clang++ 0x0000000103a7a342
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) + 82
15 clang++ 0x0000000103a78465
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
+ 2181
16 clang++ 0x0000000103b17e4e
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 846
17 clang++ 0x0000000103b17932
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 610
18 clang++ 0x0000000103b1623d
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2557
19 clang++ 0x0000000103a8d4e5
clang::Parser::ParseExportDeclaration() + 453
20 clang++ 0x0000000103b15c43
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1027
21 clang++ 0x0000000103a8cb49
clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo,
4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&,
clang::BalancedDelimiterTracker&) + 265
22 clang++ 0x0000000103a8c6d9
clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&,
clang::SourceLocation) + 5913
23 clang++ 0x0000000103a731a6
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&,
clang::SourceLocation*) + 1110
24 clang++ 0x0000000103b15904
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 196
25 clang++ 0x0000000103b145be
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
+ 1726
26 clang++ 0x0000000103b13dfa
clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) +
42
27 clang++ 0x0000000103a64048 clang::ParseAST(clang::Sema&,
bool, bool) + 472
28 clang++ 0x0000000102dd0d5a clang::FrontendAction::Execute()
+ 154
29 clang++ 0x0000000102d60a5b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1643
30 clang++ 0x0000000102e44a65
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1541
31 clang++ 0x00000001009ce05e cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 2622
32 clang++ 0x00000001009cc1b9
ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 1209
33 clang++ 0x0000000102c04767 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__1::basic_string<char, std::__1::char_traits<char>,</span >
std::__1::allocator<char> >*, bool*) const::$_1>(long) + 23
34 clang++ 0x000000010253e2fa
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 218
35 clang++ 0x0000000102c03b25
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__1::basic_string<char, std::__1::char_traits<char>,</span >
std::__1::allocator<char> >*, bool*) const + 341
36 clang++ 0x0000000102bd4d1f
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const + 399
37 clang++ 0x0000000102bd512f
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&)
const + 143
38 clang++ 0x0000000102bece3c
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) +
396
39 clang++ 0x00000001009cb7b8 main + 11208
40 libdyld.dylib 0x00007fff74dce3d5 start + 1
41 libdyld.dylib 0x0000000000000004 start + 18446603338555530288
clang-11: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 11.0.0 (<a href="mailto:git@github.com">git@github.com</a>:Quuxplusone/llvm-project
57c3fe76a31663526c78ed6ac3bbb34858c823d2)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Users/aodwyer/llvm-project/build/bin
clang-11: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-11: note: diagnostic msg:
/var/folders/0l/9t0yv2890_g4wgmy53n_mg7w0000gy/T/test-b61954.cpp
clang-11: note: diagnostic msg:
/var/folders/0l/9t0yv2890_g4wgmy53n_mg7w0000gy/T/test-b61954.sh
clang-11: note: diagnostic msg: Crash backtrace is located in
clang-11: note: diagnostic msg:
/Users/aodwyer/Library/Logs/DiagnosticReports/clang-11_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang-11: note: diagnostic msg: (choose the .crash file that corresponds to
your crash)
clang-11: note: diagnostic msg:
********************</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>