[cfe-dev] clang fails assertion given function with >256 parameters
eli.friedman at gmail.com
Wed Oct 5 12:02:27 PDT 2011
On Wed, Oct 5, 2011 at 11:33 AM, John Garvin <jgarvin at apple.com> wrote:
> The clang compiler currently fails an assertion when given a function with more than 256 arguments. This started happening in John McCall's commit r130671, which changed the representation of parameters to reduce memory usage. Specifically, the parameter index (FunctionScopeIndex changed to ParameterIndex in the ParmVarDecl class in Decl.h) was changed from 16 bits to 8 bits.
> Changing it back to 16 bits is one obvious solution, but it would increase memory usage. What's the right thing to do here?
It shouldn't be too hard to add some error checking here; it's just
that nobody has done it yet. Do you actually have code with a
function that takes more than 256 arguments? :)
More information about the cfe-dev