[llvm-bugs] [Bug 47318] New: Assertion `(!needsOverloadResolutionForDestructor() || (data().DeclaredSpecialMembers & SMF_Destructor)) && "this property has not yet been computed by Sema"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 26 08:33:40 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47318

            Bug ID: 47318
           Summary: Assertion `(!needsOverloadResolutionForDestructor() ||
                    (data().DeclaredSpecialMembers & SMF_Destructor)) &&
                    "this property has not yet been computed by Sema"'
                    failed.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hokein at google.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

reproduce code:

class Base {
public:
  ~Base();
};

class Derived : public Base {
public:
  ~Derived(int);
};


stacktrace:


clang: /llvm-project/clang/include/clang/AST/DeclCXX.h:697: bool
clang::CXXRecordDecl::defaultedDestructorIsDeleted() const: Assertion
`(!needsOverloadResolutionForDestructor() || (data().DeclaredSpecialMembers &
SMF_Destructor)) && "this property has not yet been computed by Sema"' failed.
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: ./bin/clang -cc1 -ast-dump /tmp/t5.cpp 
1.      /tmp/t5.cpp:12:2: current parser token ';'
2.      /tmp/t5.cpp:9:1: parsing struct/union/class body 'Derived'
 #0 0x0000000004475c4a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
/llvm-project/llvm/lib/Support/Unix/Signals.inc:563:11
 #1 0x0000000004475dfb PrintStackTraceSignalHandler(void*)
/llvm-project/llvm/lib/Support/Unix/Signals.inc:627:1
 #2 0x00000000044745db llvm::sys::RunSignalHandlers()
/llvm-project/llvm/lib/Support/Signals.cpp:69:5
 #3 0x000000000447654d SignalHandler(int)
/llvm-project/llvm/lib/Support/Unix/Signals.inc:405:1
 #4 0x00007f0e5eb7b110 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14110)
 #5 0x00007f0e5d0f6761 raise
/build/glibc-M65Gwz/glibc-2.30/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #6 0x00007f0e5d0e055b abort /build/glibc-M65Gwz/glibc-2.30/stdlib/abort.c:81:7
 #7 0x00007f0e5d0e042f get_sysdep_segment_value
/build/glibc-M65Gwz/glibc-2.30/intl/loadmsgcat.c:509:8
 #8 0x00007f0e5d0e042f _nl_load_domain
/build/glibc-M65Gwz/glibc-2.30/intl/loadmsgcat.c:970:34
 #9 0x00007f0e5d0ef092 (/lib/x86_64-linux-gnu/libc.so.6+0x34092)
#10 0x0000000007f0b3c1 clang::CXXRecordDecl::defaultedDestructorIsDeleted()
const /llvm-project/clang/include/clang/AST/DeclCXX.h:0:5
#11 0x0000000007e3c7cf canPassInRegisters(clang::Sema&, clang::CXXRecordDecl*,
clang::TargetInfo::CallingConvKind)
/llvm-project/clang/lib/Sema/SemaDeclCXX.cpp:6466:74
#12 0x0000000007e3b2c6 clang::Sema::CheckCompletedCXXClass(clang::Scope*,
clang::CXXRecordDecl*) /llvm-project/clang/lib/Sema/SemaDeclCXX.cpp:6807:8
#13 0x0000000007e446f7
clang::Sema::ActOnFinishCXXMemberSpecification(clang::Scope*,
clang::SourceLocation, clang::Decl*, clang::SourceLocation,
clang::SourceLocation, clang::ParsedAttributesView const&)
/llvm-project/clang/lib/Sema/SemaDeclCXX.cpp:9815:1
#14 0x0000000007a1c5a6
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) /llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3369:7
#15 0x0000000007a1ac0d
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&)
/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:1962:7
#16 0x00000000079f4402
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*)
/llvm-project/clang/lib/Parse/ParseDecl.cpp:3839:12
#17 0x00000000079ced4d
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
/llvm-project/clang/lib/Parse/Parser.cpp:1011:7
#18 0x00000000079ce920
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
/llvm-project/clang/lib/Parse/Parser.cpp:1116:12
#19 0x00000000079ce1b3
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) /llvm-project/clang/lib/Parse/Parser.cpp:936:12
#20 0x00000000079cc475
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
/llvm-project/clang/lib/Parse/Parser.cpp:684:12

-- 
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/20200826/d14618cb/attachment.html>


More information about the llvm-bugs mailing list