[LLVMbugs] [Bug 7908] New: clang c++ crash catching an object whose copy constructor has a destructible default argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Aug 14 20:41:31 PDT 2010


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

           Summary: clang c++ crash catching an object whose copy
                    constructor has a destructible default argument
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Testcase:
struct D {
  ~D();
};
struct S {
  S(const S&, D = D());
};
void foo() {
  try {} catch (S s) {}
}

Crashes with:
clang: SemaDecl.cpp:4893: clang::OpaquePtr<0>
clang::Sema::ActOnFinishFunctionBody(clang::OpaquePtr<0>,
clang::ASTOwningPtr<&clang::ActionBase::DeleteStmt>, bool): Assertion
`ExprTemporaries.empty() && "Leftover temporaries in function"' failed.

-- 
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