Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Assertion failed: (Result.isInvalid() && "C++ subscript operator overloading is missing candidates!"), function CreateOverloadedArraySubscriptExpr, file SemaOverload.cpp, line 5045. #5861

Closed Quuxplusone closed 14 years ago

Quuxplusone commented 15 years ago
Bugzilla Link PR5360
Status RESOLVED FIXED
Importance P normal
Reported by Roman Divacky (rdivacky@freebsd.org)
Reported on 2009-10-31 17:54:18 -0700
Last modified on 2010-02-22 12:54:00 -0800
Version unspecified
Hardware PC FreeBSD
CC dgregor@apple.com, llvm-bugs@lists.llvm.org, sebastian.redl@getdesigned.at
Fixed by commit(s)
Attachments jsapi.cpp (477571 bytes, application/octet-stream)
157.cpp (259 bytes, text/x-c++src)
Blocks
Blocked by
See also
Created attachment 3732
test case

the attached fails with:

witten /tmp# clang -fsyntax-only jsapi.cpp

Assertion failed: (Result.isInvalid() && "C++ subscript operator overloading is
missing candidates!"), function CreateOverloadedArraySubscriptExpr, file
SemaOverload.cpp, line 5045.
Stack dump:
0.  Program arguments: /usr/local/bin/../libexec/clang-cc -triple i386-unknown-
freebsd9.0 -S -disable-free -main-file-name jsapi.cpp --relocation-model static
--disable-fp-elim --unwind-tables=0 --mcpu=pentium4 --fmath-errno=1 -
fexceptions -fdiagnostics-show-option -o /tmp/cc-9mhTHr.s -x c++ jsapi.cpp
1.  ./nanojit/RegAlloc.h:69:32: current parser token ']'
2.  ./nanojit/RegAlloc.h:44:1: parsing namespace 'nanojit'
3.  ./nanojit/RegAlloc.h:51:2: parsing struct/union/class body
'nanojit::RegAlloc'
4.  ./nanojit/RegAlloc.h:67:45: parsing function body
'nanojit::RegAlloc::getPriority'
5.  ./nanojit/RegAlloc.h:67:45: in compound statement ('{}')
Quuxplusone commented 14 years ago

That's a massive test case. Do you think you could reduce it?

Quuxplusone commented 14 years ago

At this point, we need very small reduced testcases to drive C++ forward. If we can't do that, I recommend closing this as invalid.

Quuxplusone commented 15 years ago

Attached jsapi.cpp (477571 bytes, application/octet-stream): test case

Quuxplusone commented 14 years ago

Attached 157.cpp (259 bytes, text/x-c++src): small test case

Quuxplusone commented 14 years ago

We didn't add any built-in candidates for the array subscript, because only pointers trigger that. Now arrays are decayed to pointers for this purpose.

Fixed in r86140.