Turn an unmatched ]] back into two ]
Needed to handle e.g. `a[a[0]]`. SWIG's parser doesn't seem to handle that currently though. See #2286.
This commit is contained in:
parent
5ddcbac56b
commit
04abbcf4ae
3 changed files with 10 additions and 2 deletions
|
|
@ -40,4 +40,11 @@ struct [[nodiscard]] S { };
|
|||
|
||||
const char *test_string_literal() { return "Test [[ and ]] in string literal"; }
|
||||
|
||||
#if 0
|
||||
// Check that SWIG doesn't choke on ]] when it's not part of an attribute.
|
||||
// FIXME: SWIG's parser doesn't handle this case currently.
|
||||
int *a;
|
||||
int b = a[a[0]];
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue