Closed llvmbot closed 3 years ago
Seems like we already support this (from Clang13). https://reviews.llvm.org/D99188 is landed.
Thanks for the report!
I hope we can address this in the following few weeks.
I attached the two files that reproduce the error, as instructed by Clang's output.
Sorry, bugzilla formatted the snippet horribly. I attach a text file, better view it with line wrapping disabled, for example less -S.
assigned to @devincoughlin
Extended Description
error: cannot import unsupported AST node DeducedTemplateSpecialization PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump:
0 Calling QQmlJS::Dom::MutableDomItem::item at line /home/cc-runs/src/qt/qt5/qtdeclarative/src/qmldom/qqmldomcompare_p.h:97:19
0 0x00007f7cbde71cf3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xcc2cf3)
1 0x00007f7cbde70010 llvm::sys::RunSignalHandlers() (/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xcc1010)
2 0x00007f7cbde7144d llvm::sys::CleanupOnSignal(unsigned long) (/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xcc244d)
3 0x00007f7cbddc1166 (/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xc12166)
4 0x00007f7cc57a9420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x15420)
5 0x00007f7cc36a4c3c clang::DeclContext::getPrimaryContext() (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xc1ac3c)
6 0x00007f7cc35c5212 clang::ASTImporterLookupTable::remove(clang::NamedDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb3b212)
7 0x00007f7cc35b09f2 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb269f2)
8 0x00007f7cc35afe3a (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25e3a)
9 0x00007f7cc35af781 clang::ASTImporter::Import(clang::QualType) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25781)
10 0x00007f7cc358b450 clang::ASTNodeImporter::VisitFunctionProtoType(clang::FunctionProtoType const*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb01450)
11 0x00007f7cc35afbb0 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25bb0)
12 0x00007f7cc35af781 clang::ASTImporter::Import(clang::QualType) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25781)
13 0x00007f7cc3594ddf clang::ASTNodeImporter::VisitFunctionDecl(clang::FunctionDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb0addf)
14 0x00007f7cc35af1e8 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb251e8)
15 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
16 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
17 0x00007f7cc3594554 clang::ASTNodeImporter::VisitFunctionDecl(clang::FunctionDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb0a554)
18 0x00007f7cc35af1e8 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb251e8)
19 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
20 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
21 0x00007f7cc358e2ad clang::ASTNodeImporter::ImportDeclContext(clang::DeclContext*, bool) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb042ad)
22 0x00007f7cc3590614 clang::ASTNodeImporter::VisitNamespaceDecl(clang::NamespaceDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb06614)
23 0x00007f7cc35af2f2 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb252f2)
24 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
25 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
26 0x00007f7cc358e2ad clang::ASTNodeImporter::ImportDeclContext(clang::DeclContext*, bool) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb042ad)
27 0x00007f7cc3590614 clang::ASTNodeImporter::VisitNamespaceDecl(clang::NamespaceDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb06614)
28 0x00007f7cc35af2f2 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb252f2)
29 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
30 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
31 0x00007f7cc358e7f8 clang::ASTImporter::ImportContext(clang::DeclContext*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb047f8)
32 0x00007f7cc358cd59 clang::ASTNodeImporter::ImportDeclContext(clang::Decl, clang::DeclContext&, clang::DeclContext*&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb02d59)
33 0x00007f7cc358cb9d clang::ASTNodeImporter::ImportDeclParts(clang::NamedDecl, clang::DeclContext&, clang::DeclContext&, clang::DeclarationName&, clang::NamedDecl&, clang::SourceLocation&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb02b9d)
34 0x00007f7cc3590396 clang::ASTNodeImporter::VisitNamespaceDecl(clang::NamespaceDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb06396)
35 0x00007f7cc35af2f2 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb252f2)
36 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
37 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
38 0x00007f7cc358e7f8 clang::ASTImporter::ImportContext(clang::DeclContext*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb047f8)
39 0x00007f7cc358cd59 clang::ASTNodeImporter::ImportDeclContext(clang::Decl, clang::DeclContext&, clang::DeclContext*&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb02d59)
40 0x00007f7cc358cb9d clang::ASTNodeImporter::ImportDeclParts(clang::NamedDecl, clang::DeclContext&, clang::DeclContext&, clang::DeclarationName&, clang::NamedDecl&, clang::SourceLocation&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb02b9d)
41 0x00007f7cc35945d2 clang::ASTNodeImporter::VisitFunctionDecl(clang::FunctionDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb0a5d2)
42 0x00007f7cc35af1e8 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb251e8)
43 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
44 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
45 0x00007f7cc3595d90 clang::ASTNodeImporter::VisitFunctionDecl(clang::FunctionDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb0bd90)
46 0x00007f7cc35af1e8 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb251e8)
47 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
48 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
49 0x00007f7cc358e2ad clang::ASTNodeImporter::ImportDeclContext(clang::DeclContext*, bool) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb042ad)
50 0x00007f7cc3590614 clang::ASTNodeImporter::VisitNamespaceDecl(clang::NamespaceDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb06614)
51 0x00007f7cc35af2f2 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb252f2)
52 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
53 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
54 0x00007f7cc358e2ad clang::ASTNodeImporter::ImportDeclContext(clang::DeclContext*, bool) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb042ad)
55 0x00007f7cc3590614 clang::ASTNodeImporter::VisitNamespaceDecl(clang::NamespaceDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb06614)
56 0x00007f7cc35af2f2 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb252f2)
57 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
58 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
59 0x00007f7cc358e7f8 clang::ASTImporter::ImportContext(clang::DeclContext*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb047f8)
60 0x00007f7cc358cd59 clang::ASTNodeImporter::ImportDeclContext(clang::Decl, clang::DeclContext&, clang::DeclContext*&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb02d59)
61 0x00007f7cc358cb9d clang::ASTNodeImporter::ImportDeclParts(clang::NamedDecl, clang::DeclContext&, clang::DeclContext&, clang::DeclarationName&, clang::NamedDecl&, clang::SourceLocation&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb02b9d)
62 0x00007f7cc3590396 clang::ASTNodeImporter::VisitNamespaceDecl(clang::NamespaceDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb06396)
63 0x00007f7cc35af2f2 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb252f2)
64 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
65 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
66 0x00007f7cc358e7f8 clang::ASTImporter::ImportContext(clang::DeclContext*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb047f8)
67 0x00007f7cc358cd59 clang::ASTNodeImporter::ImportDeclContext(clang::Decl, clang::DeclContext&, clang::DeclContext*&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb02d59)
68 0x00007f7cc358cb9d clang::ASTNodeImporter::ImportDeclParts(clang::NamedDecl, clang::DeclContext&, clang::DeclContext&, clang::DeclarationName&, clang::NamedDecl&, clang::SourceLocation&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb02b9d)
69 0x00007f7cc3592521 clang::ASTNodeImporter::VisitRecordDecl(clang::RecordDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb08521)
70 0x00007f7cc35af20e (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb2520e)
71 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
72 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
73 0x00007f7cc358e7f8 clang::ASTImporter::ImportContext(clang::DeclContext*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb047f8)
74 0x00007f7cc358cd59 clang::ASTNodeImporter::ImportDeclContext(clang::Decl, clang::DeclContext&, clang::DeclContext*&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb02d59)
75 0x00007f7cc358cb9d clang::ASTNodeImporter::ImportDeclParts(clang::NamedDecl, clang::DeclContext&, clang::DeclContext&, clang::DeclarationName&, clang::NamedDecl&, clang::SourceLocation&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb02b9d)
76 0x00007f7cc35945d2 clang::ASTNodeImporter::VisitFunctionDecl(clang::FunctionDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb0a5d2)
77 0x00007f7cc35af1e8 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb251e8)
78 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
79 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
80 0x00007f7cc3594554 clang::ASTNodeImporter::VisitFunctionDecl(clang::FunctionDecl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb0a554)
81 0x00007f7cc35af1e8 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb251e8)
82 0x00007f7cc35af197 clang::ASTImporter::ImportImpl(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb25197)
83 0x00007f7cc35b0805 clang::ASTImporter::Import(clang::Decl*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xb26805)
84 0x00007f7cc3a3b148 llvm::Expected<clang::FunctionDecl const> clang::cross_tu::CrossTranslationUnitContext::importDefinitionImpl(clang::FunctionDecl const , clang::ASTUnit*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xfb1148)
85 0x00007f7cc3a384f8 llvm::Expected<clang::FunctionDecl const> clang::cross_tu::CrossTranslationUnitContext::getCrossTUDefinitionImpl(clang::FunctionDecl const , llvm::StringRef, llvm::StringRef, bool) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xfae4f8)
86 0x00007f7cc3a38186 clang::cross_tu::CrossTranslationUnitContext::getCrossTUDefinition(clang::FunctionDecl const*, llvm::StringRef, llvm::StringRef, bool) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xfae186)
87 0x00007f7cc4bd635c clang::ento::AnyFunctionCall::getRuntimeDefinition() const (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x214c35c)
88 0x00007f7cc4bd6ef2 clang::ento::CXXInstanceCall::getRuntimeDefinition() const (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x214cef2)
89 0x00007f7cc4c191ad clang::ento::ExprEngine::defaultEvalCall(clang::ento::NodeBuilder&, clang::ento::ExplodedNode*, clang::ento::CallEvent const&, clang::ento::EvalCallOptions const&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x218f1ad)
90 0x00007f7cc4be0416 clang::ento::CheckerManager::runCheckersForEvalCall(clang::ento::ExplodedNodeSet&, clang::ento::ExplodedNodeSet const&, clang::ento::CallEvent const&, clang::ento::ExprEngine&, clang::ento::EvalCallOptions const&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x2156416)
91 0x00007f7cc4c17686 clang::ento::ExprEngine::evalCall(clang::ento::ExplodedNodeSet&, clang::ento::ExplodedNode*, clang::ento::CallEvent const&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x218d686)
92 0x00007f7cc4c17374 clang::ento::ExprEngine::VisitCallExpr(clang::CallExpr const, clang::ento::ExplodedNode, clang::ento::ExplodedNodeSet&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x218d374)
93 0x00007f7cc4bfe4bc clang::ento::ExprEngine::Visit(clang::Stmt const, clang::ento::ExplodedNode, clang::ento::ExplodedNodeSet&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x21744bc)
94 0x00007f7cc4bfa3ca clang::ento::ExprEngine::ProcessStmt(clang::Stmt const, clang::ento::ExplodedNode) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x21703ca)
95 0x00007f7cc4bfa0d3 clang::ento::ExprEngine::processCFGElement(clang::CFGElement, clang::ento::ExplodedNode, unsigned int, clang::ento::NodeBuilderContext) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x21700d3)
96 0x00007f7cc4be6818 clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*, clang::ProgramPoint, clang::ento::WorkListUnit const&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x215c818)
97 0x00007f7cc4be64a4 clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*, unsigned int, llvm::IntrusiveRefCntPtr) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x215c4a4)
98 0x00007f7cc4f0aa16 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x2480a16)
99 0x00007f7cc4ef6a48 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x246ca48)
100 0x00007f7cc3466b34 clang::ParseAST(clang::Sema&, bool, bool) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x9dcb34)
101 0x00007f7cc49fbf78 clang::FrontendAction::Execute() (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1f71f78)
102 0x00007f7cc4989c31 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1effc31)
103 0x00007f7cc4a5e362 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1fd4362)
104 0x0000000000412782 cc1_main(llvm::ArrayRef<char const>, char const, void*) (/usr/lib/llvm-12/bin/clang+0x412782)
105 0x0000000000410afe (/usr/lib/llvm-12/bin/clang+0x410afe)
106 0x00007f7cc46a5be2 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1c1bbe2)
107 0x00007f7cbddc0f3d llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xc11f3d)
108 0x00007f7cc46a53d9 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool) const (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1c1b3d9)
109 0x00007f7cc467a98f clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1bf098f)
110 0x00007f7cc467ad47 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1bf0d47)
111 0x00007f7cc468f7fc clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1c057fc)
112 0x00000000004103d4 main (/usr/lib/llvm-12/bin/clang+0x4103d4)
113 0x00007f7cbcc960b3 __libc_start_main /build/glibc-YbNSs7/glibc-2.31/csu/../csu/libc-start.c:342:3
114 0x000000000040dcbe _start (/usr/lib/llvm-12/bin/clang+0x40dcbe)
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation) Ubuntu clang version 12.0.1-++20211011094644+fed41342a82f-1~exp1~20211011215105.3 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm-12/bin clang: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang: note: diagnostic msg: /tmp/qqmldomcompare-9bf7ce.cpp clang: note: diagnostic msg: /tmp/qqmldomcompare-9bf7ce.sh clang: note: diagnostic msg: