[LLVMbugs] [Bug 6928] New: Assertion with implicitly-generated copy constructor call with default arguments

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Apr 24 16:56:50 PDT 2010


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

           Summary: Assertion with implicitly-generated copy constructor
                    call with default arguments
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dgregor at apple.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


cove:clang dgregor$ cat t2.C
template <typename T>
struct X {
  X();
  X(const X&, bool = false);
};

struct Y { 
  X<int> x;
};

void f(Y);

void g() {
  Y y;
  f(y);
}
cove:clang dgregor$ clang++ t2.C
Assertion failed: (!hasUninstantiatedDefaultArg() && "Default argument is not
yet instantiated!"), function getDefaultArg, file
/Users/dgregor/Projects/llvm/tools/clang/lib/AST/Decl.cpp, line 845.

The problem here is that CodeGen is poking directly at the default arguments of
the ParmVarDecls in the copy constructor when it generates the copy-constructor
call, rather than letting Sema do that work.

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