[LLVMbugs] [Bug 16292] New: Clang asserts when using new on derived template class with incomplete member in base class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 10 15:40:14 PDT 2013


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

            Bug ID: 16292
           Summary: Clang asserts when using new on derived template class
                    with incomplete member in base class
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rtrieu at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Clang asserts on the following code:



class IncompleteClass;

class BaseClass {
  IncompleteClass Foo;
};

template<class T>
class DerivedClass : public BaseClass {};

void* Bar = new DerivedClass<void>;



clang-3.3: /llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:2470: const
clang::ASTRecordLayout& clang::ASTContext::getASTRecordLayout(const
clang::RecordDecl*) const: Assertion `D && "Cannot get layout of forward
declarations!"' failed.

-- 
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/20130610/f0660620/attachment.html>


More information about the llvm-bugs mailing list