Restore handling for '<<' in array size

I accidentally dropped this in 8fb15fcc92.
This commit is contained in:
Olly Betts 2023-04-20 14:53:30 +12:00
parent 752ec61d27
commit c538bd24c4
1 changed files with 2 additions and 1 deletions

View File

@ -1700,7 +1700,8 @@ void SwigType_remember_clientdata(const SwigType *t, const_String_or_char_ptr cl
if (t) {
char *ct = Char(t);
const char *lt = strchr(ct, '<');
if (lt && lt[1] != '(') {
/* Allow for `<<` operator in constant expression for array size. */
if (lt && lt[1] != '(' && lt[1] != '<') {
/* We special case `<<` above, but most cases aren't handled, for example:
*
* unsigned char myarray[std::numeric_limits<unsigned char>::max()]; // #2486