[llvm-bugs] [Bug 45962] New: [modules] ICE in diagnoseQualifiedDeclaration after "export b::a"
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun May 17 12:16:35 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45962
Bug ID: 45962
Summary: [modules] ICE in diagnoseQualifiedDeclaration after
"export b::a"
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: arthur.j.odwyer at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Created attachment 23500
--> https://bugs.llvm.org/attachment.cgi?id=23500&action=edit
/var/folders/0l/9t0yv2890_g4wgmy53n_mg7w0000gy/T/test-b61954.sh
Bug 39081 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 https://bugs.llvm.org/ 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>
>, std::__1::basic_string<char, std::__1::char_traits<char>,
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>
>, std::__1::basic_string<char, std::__1::char_traits<char>,
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 (git at github.com: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:
********************
--
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/20200517/2b7f4c1d/attachment-0001.html>
More information about the llvm-bugs
mailing list