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

             Bug #: 12778
           Summary: Error recovery can trigger  Assertion `i <
                    getNumParams() && "Illegal param #"' (Decl.h:1820)
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


Created attachment 8521
  --> http://llvm.org/bugs/attachment.cgi?id=8521
reduced test case (provided by C.S.)

Running clang trunk on x86_64 on:

 void operator delete() throw(void*);
           pointer allocate(size_type __n, const void* = 0) {
   return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));

results in:

In file included from prog.cpp:1:
prog.cpp:1:7: error: 'operator delete' must have at least one parameter.
 void operator delete() throw(void*);
      ^
prog.cpp:2:12: error: unknown type name 'pointer'
           pointer allocate(size_type __n, const void* = 0) {
           ^
prog.cpp:2:29: error: unknown type name 'size_type'
           pointer allocate(size_type __n, const void* = 0) {
                            ^
prog.cpp:3:23: error: unknown type name '_Tp'
   return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
                      ^
clang:
/src/llvm-trunk-writable/tools/clang/lib/Sema/../../include/clang/AST/Decl.h:1820:
clang::ParmVarDecl* clang::FunctionDecl::getParamDecl(unsigned int): Assertion
`i < getNumParams() && "Illegal param #"' 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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to