Fixed assertion on type checking for arguments and parameters on function call if arguments are pointers to VLA
Details
Diff Detail
Event Timeline
lib/CodeGen/CodeGenFunction.h | ||
---|---|---|
2752 | Pointers aren't the only variably-modified type; you need to be able to look through functions types as well. Something like:: size_t test(int n, int (*(*fn)(void))[n]) And you're not looking through references, either. But why not just have an exception for any variably-modified type? | |
2756 | If you do keep this code, use castAs<> for casts that you know will succeed. |
Okay, but now that you have an exception for variably-modified types, why you do need to look through pointer types at all? Shouldn't the argument type always match exactly unless it's variably-modified?
Yep, you're right, we don't need to dig through all these pointers. I'll
fix it.
Best regards,
Alexey Bataev
Software Engineer
Intel Compiler Team
16.12.2014 21:16, John McCall пишет:
Okay, but now that you have an exception for variably-modified types, why you do need to look through pointer types at all? Shouldn't the argument type always match exactly unless it's variably-modified?
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
Pointers aren't the only variably-modified type; you need to be able to look through functions types as well. Something like::
And you're not looking through references, either.
But why not just have an exception for any variably-modified type?