Suppress warning 325 "Nested class not currently supported (Foo

ignored)" when Foo has already been explicitly ignored with
"%ignore".
This commit is contained in:
Olly Betts 2015-05-05 18:06:04 +12:00
commit b19d506db7
3 changed files with 16 additions and 9 deletions

View file

@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.6 (in progress)
===========================
2015-05-05: olly
Suppress warning 325 "Nested class not currently supported (Foo
ignored)" when Foo has already been explicitly ignored with "%ignore".
2015-05-04: wsfulton
Add support for friend templates, including operator overloading - fixes #196. Considering
the example below, previously the operator gave a syntax error and friendfunc incorrectly

View file

@ -100,4 +100,9 @@ void overloadinline2(const int *) {}
void overload5(int *) {}
void overload5(const int *) {}
%ignore Outer2::QuietInner;
struct Outer2 {
struct QuietInner {
VARIABLEMACRO(MyInnerVar)
};
};

View file

@ -977,7 +977,6 @@ static void update_nested_classes(Node *n)
static Node *nested_forward_declaration(const char *storage, const char *kind, String *sname, String *name, Node *cpp_opt_declarators) {
Node *nn = 0;
int warned = 0;
if (sname) {
/* Add forward declaration of the nested type */
@ -1021,13 +1020,12 @@ static Node *nested_forward_declaration(const char *storage, const char *kind, S
if (!currentOuterClass || !GetFlag(currentOuterClass, "nested")) {
if (nn && Equal(nodeType(nn), "classforward")) {
Node *n = nn;
SWIG_WARN_NODE_BEGIN(n);
Swig_warning(WARN_PARSE_NAMED_NESTED_CLASS, cparse_file, cparse_line,"Nested %s not currently supported (%s ignored)\n", kind, sname ? sname : name);
SWIG_WARN_NODE_END(n);
warned = 1;
}
if (!warned) {
if (!GetFlag(n, "feature:ignore")) {
SWIG_WARN_NODE_BEGIN(n);
Swig_warning(WARN_PARSE_NAMED_NESTED_CLASS, cparse_file, cparse_line,"Nested %s not currently supported (%s ignored)\n", kind, sname ? sname : name);
SWIG_WARN_NODE_END(n);
}
} else {
Swig_warning(WARN_PARSE_UNNAMED_NESTED_CLASS, cparse_file, cparse_line, "Nested %s not currently supported (ignored).\n", kind);
}
}