[llvm-bugs] [Bug 43834] New: -ast-dump triggers assertion `!isa<ElaboratedType>(T) && "Elaborated type in nested-name-specifier"'
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 29 01:59:05 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43834
Bug ID: 43834
Summary: -ast-dump triggers assertion `!isa<ElaboratedType>(T)
&& "Elaborated type in nested-name-specifier"'
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: stephan.bergmann.secondary at googlemail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
At least with recent trunk ("clang version 10.0.0
(git at github.com:llvm/llvm-project 93e137f898296d142d056c892b10d40ca3c26f00)"):
> $ cat test.cc
> namespace N { template<typename> struct S1; }
> template<typename T> struct S2 {
> using U = N::S1<typename N::S1<T>::t>;
> S2(typename U::t);
> };
> template<typename T> S2(T) -> S2<void>;
> $ clang++ -Xclang -ast-dump -std=c++17 -fsyntax-only test.cc >/dev/null
> clang-10: /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/NestedNameSpecifier.cpp:328: void clang::NestedNameSpecifier::print(llvm::raw_ostream&, const clang::PrintingPolicy&, bool) const: Assertion `!isa<ElaboratedType>(T) && "Elaborated type in nested-name-specifier"' failed.
> Stack dump:
> 0. Program arguments: /data/sbergman/llvm/debug/inst/bin/clang-10 -cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -disable-free -main-file-name test.cc -mrelocation-model static -mthread-model posix -mframe-pointer=all -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -resource-dir /data/sbergman/llvm/debug/inst/lib/clang/10.0.0 -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9 -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/x86_64-redhat-linux -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/backward -internal-isystem /usr/local/include -internal-isystem /data/sbergman/llvm/debug/inst/lib/clang/10.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -std=c++17 -fdeprecated-macro -fdebug-compilation-dir /data/sbergman/lo-clang2/core -ferror-limit 19 -fmessage-length 0 -fgnuc-version=4.2.1 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -ast-dump -faddrsig -x c++ test.cc
> 1. <eof> parser at end of file
> #0 0x00007f7b17f046fe llvm::sys::PrintStackTrace(llvm::raw_ostream&) /data/sbergman/github.com/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:544:22
> #1 0x00007f7b17f04791 PrintStackTraceSignalHandler(void*) /data/sbergman/github.com/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:605:1
> #2 0x00007f7b17f028e8 llvm::sys::RunSignalHandlers() /data/sbergman/github.com/llvm/llvm-project/llvm/lib/Support/Signals.cpp:68:20
> #3 0x00007f7b17f0414e SignalHandler(int) /data/sbergman/github.com/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:391:1
> #4 0x00007f7b170e3c60 __restore_rt (/lib64/libpthread.so.0+0x12c60)
> #5 0x00007f7b1462ce35 raise /usr/src/debug/glibc-2.29-32-g6d8eaf4a25/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
> #6 0x00007f7b14617895 abort /usr/src/debug/glibc-2.29-32-g6d8eaf4a25/stdlib/abort.c:81:7
> #7 0x00007f7b14617769 _nl_load_domain.cold /usr/src/debug/glibc-2.29-32-g6d8eaf4a25/intl/loadmsgcat.c:1177:9
> #8 0x00007f7b14625566 (/lib64/libc.so.6+0x30566)
> #9 0x00007f7b12492f69 clang::NestedNameSpecifier::print(llvm::raw_ostream&, clang::PrintingPolicy const&, bool) const (.localalias) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/NestedNameSpecifier.cpp:328:5
> #10 0x00007f7b1258ee46 (anonymous namespace)::TypePrinter::printDependentNameBefore(clang::DependentNameType const*, llvm::raw_ostream&) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/TypePrinter.cpp:1367:37
> #11 0x00007f7b1258a09b (anonymous namespace)::TypePrinter::printBefore(clang::Type const*, clang::Qualifiers, llvm::raw_ostream&) /data/sbergman/llvm/debug/build/tools/clang/include/clang/AST/TypeNodes.inc:35:1
> #12 0x00007f7b12589ad6 (anonymous namespace)::TypePrinter::print(clang::Type const*, clang::Qualifiers, llvm::raw_ostream&, llvm::StringRef) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/TypePrinter.cpp:186:9
> #13 0x00007f7b12589a56 (anonymous namespace)::TypePrinter::print(clang::QualType, llvm::raw_ostream&, llvm::StringRef) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/TypePrinter.cpp:174:1
> #14 0x00007f7b1258ccb1 (anonymous namespace)::TypePrinter::printFunctionProtoAfter(clang::FunctionProtoType const*, llvm::raw_ostream&) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/TypePrinter.cpp:791:5
> #15 0x00007f7b1258aa61 (anonymous namespace)::TypePrinter::printAfter(clang::Type const*, clang::Qualifiers, llvm::raw_ostream&) /data/sbergman/llvm/debug/build/tools/clang/include/clang/AST/TypeNodes.inc:44:1
> #16 0x00007f7b12589b04 (anonymous namespace)::TypePrinter::print(clang::Type const*, clang::Qualifiers, llvm::raw_ostream&, llvm::StringRef) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/TypePrinter.cpp:183:70
> #17 0x00007f7b12590838 clang::QualType::getAsStringInternal(clang::Type const*, clang::Qualifiers, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, clang::PrintingPolicy const&) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/TypePrinter.cpp:1906:3
> #18 0x00007f7b125905fc clang::QualType::getAsString[abi:cxx11](clang::Type const*, clang::Qualifiers, clang::PrintingPolicy const&) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/TypePrinter.cpp:1877:10
> #19 0x00007f7b12462f17 clang::QualType::getAsString[abi:cxx11](clang::SplitQualType, clang::PrintingPolicy const&) /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/Type.h:982:3
> #20 0x00007f7b1253957d clang::TextNodeDumper::dumpBareType(clang::QualType, bool) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/TextNodeDumper.cpp:390:58
> #21 0x00007f7b125396d4 clang::TextNodeDumper::dumpType(clang::QualType) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/TextNodeDumper.cpp:403:1
> #22 0x00007f7b1253d831 clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/TextNodeDumper.cpp:1274:39
> #23 0x00007f7b1255944f clang::declvisitor::Base<llvm::make_const_ptr, clang::TextNodeDumper, void>::VisitCXXDeductionGuideDecl(clang::CXXDeductionGuideDecl const*) /data/sbergman/llvm/debug/build/tools/clang/include/clang/AST/DeclNodes.inc:399:1
> #24 0x00007f7b12553e80 clang::declvisitor::Base<llvm::make_const_ptr, clang::TextNodeDumper, void>::Visit(clang::Decl const*) /data/sbergman/llvm/debug/build/tools/clang/include/clang/AST/DeclNodes.inc:399:1
> #25 0x00007f7b12538c30 clang::TextNodeDumper::Visit(clang::Decl const*) /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/TextNodeDumper.cpp:277:1
> #26 0x00007f7b11fe5869 clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()::operator()() const /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/ASTNodeTraverser.h:78:32
> #27 0x00007f7b11fef9ac void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/TextNodeDumper.h:103:14
> #28 0x00007f7b1200a153 std::_Function_handler<void (bool), void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)>::_M_invoke(std::_Any_data const&, bool&&) /usr/include/c++/9/bits/std_function.h:302:7
> #29 0x00007f7b11fefdae std::function<void (bool)>::operator()(bool) const /usr/include/c++/9/bits/std_function.h:690:71
> #30 0x00007f7b11fef9ec void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/TextNodeDumper.h:72:27
> #31 0x00007f7b1200a153 std::_Function_handler<void (bool), void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)>::_M_invoke(std::_Any_data const&, bool&&) /usr/include/c++/9/bits/std_function.h:302:7
> #32 0x00007f7b11fefdae std::function<void (bool)>::operator()(bool) const /usr/include/c++/9/bits/std_function.h:690:71
> #33 0x00007f7b11fefcae void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper) /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/TextNodeDumper.h:116:33
> #34 0x00007f7b11fe84ec void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(clang::ASTDumper) /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/TextNodeDumper.h:49:3
> #35 0x00007f7b11fe5a0c clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*) /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/ASTNodeTraverser.h:98:3
> #36 0x00007f7b11fe8489 clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpDeclContext(clang::DeclContext const*) /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/ASTNodeTraverser.h:230:5
> #37 0x00007f7b11fe59c0 clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()::operator()() const /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/ASTNodeTraverser.h:95:11
> #38 0x00007f7b11fefb24 void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper) /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/TextNodeDumper.h:59:28
> #39 0x00007f7b11fe84ec void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(clang::ASTDumper) /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/TextNodeDumper.h:49:3
> #40 0x00007f7b11fe5a0c clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*) /data/sbergman/github.com/llvm/llvm-project/clang/include/clang/AST/ASTNodeTraverser.h:98:3
> #41 0x00007f7b11fdf118 clang::Decl::dump(llvm::raw_ostream&, bool, clang::ASTDumpOutputFormat) const /data/sbergman/github.com/llvm/llvm-project/clang/lib/AST/ASTDumper.cpp:193:77
> #42 0x00007f7b155105cd (anonymous namespace)::ASTPrinter::print(clang::Decl*) /data/sbergman/github.com/llvm/llvm-project/clang/lib/Frontend/ASTConsumers.cpp:96:5
> #43 0x00007f7b155101c9 (anonymous namespace)::ASTPrinter::HandleTranslationUnit(clang::ASTContext&) /data/sbergman/github.com/llvm/llvm-project/clang/lib/Frontend/ASTConsumers.cpp:48:23
> #44 0x00007f7b106ed7b0 clang::ParseAST(clang::Sema&, bool, bool) /data/sbergman/github.com/llvm/llvm-project/clang/lib/Parse/ParseAST.cpp:178:14
> #45 0x00007f7b156ce653 clang::ASTFrontendAction::ExecuteAction() /data/sbergman/github.com/llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1042:11
> #46 0x00007f7b156cdfbf clang::FrontendAction::Execute() /data/sbergman/github.com/llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:939:38
> #47 0x00007f7b15654689 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /data/sbergman/github.com/llvm/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:964:42
> #48 0x00007f7b1518e719 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /data/sbergman/github.com/llvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:290:38
> #49 0x0000000000269729 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /data/sbergman/github.com/llvm/llvm-project/clang/tools/driver/cc1_main.cpp:250:40
> #50 0x000000000025f64d ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /data/sbergman/github.com/llvm/llvm-project/clang/tools/driver/driver.cpp:309:64
> #51 0x000000000025fcad main /data/sbergman/github.com/llvm/llvm-project/clang/tools/driver/driver.cpp:382:26
> #52 0x00007f7b14618f43 __libc_start_main /usr/src/debug/glibc-2.29-32-g6d8eaf4a25/csu/../csu/libc-start.c:342:3
> #53 0x000000000025e02e _start (/data/sbergman/llvm/debug/inst/bin/clang-10+0x25e02e)
--
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/20191029/ad3eb028/attachment-0001.html>
More information about the llvm-bugs
mailing list