summaryrefslogtreecommitdiff
path: root/Source/Modules/allocate.cxx
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2023-01-05 16:54:16 +1300
committerOlly Betts <olly@survex.com>2023-05-11 13:11:22 +1200
commit9c8d6563498bbfd22d05b225930409236834b867 (patch)
tree197887f358073c65a911882674c874ee4e17cd9a /Source/Modules/allocate.cxx
parent38f8f15fcd4747cb1db136de74874dd779a75c6f (diff)
downloadswig-9c8d6563498bbfd22d05b225930409236834b867.tar.gz
Parse storage class more flexiblyparse-storage-class-flexibly
Previously we had a hard-coded list of allowed combinations in the grammar, but this suffers from combinatorial explosion, and results in a vague `Syntax error in input` error for invalid combinations. This means we now support a number of cases which are valid C++ but weren't supported. Fixes #302 Fixes #2079 (friend constexpr) Fixes #2474 (virtual explicit)
Diffstat (limited to 'Source/Modules/allocate.cxx')
-rw-r--r--Source/Modules/allocate.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Modules/allocate.cxx b/Source/Modules/allocate.cxx
index 0e1262f83..233830791 100644
--- a/Source/Modules/allocate.cxx
+++ b/Source/Modules/allocate.cxx
@@ -396,7 +396,7 @@ class Allocate:public Dispatcher {
if (!GetFlag(c, "feature:ignore")) {
String *storage = Getattr(c, "storage");
if (!((Cmp(storage, "typedef") == 0))
- && !((Cmp(storage, "friend") == 0))) {
+ && !Strstr(storage, "friend")) {
String *name = Getattr(c, "name");
String *symname = Getattr(c, "sym:name");
Node *e = Swig_symbol_clookup_local(name, 0);