[LLVMbugs] [Bug 13527] New: crash-on-invalid: assertion failure when destructor is both deleted and defaulted

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Aug 5 04:52:16 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13527

             Bug #: 13527
           Summary: crash-on-invalid: assertion failure when destructor is
                    both deleted and defaulted
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: benny.kra at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


$ cat t.cpp
struct X {
  ~X() = delete;
};

X::~X() = default;

$ clang -std=c++11 t.cpp
t.cpp:5:4: error: redefinition of '~X'
X::~X() = default;
   ^
t.cpp:2:3: note: previous definition is here
  ~X() = delete;
  ^
Assertion failed: ((Destructor->isDefaulted() &&
!Destructor->doesThisDeclarationHaveABody() && !Destructor->isDeleted()) &&
"DefineImplicitDestructor - call it for implicit default dtor"), function
DefineImplicitDestructor, file SemaDeclCXX.cpp, line 7182.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list