Don't warn about legal extern "C++" {} block

This commit is contained in:
Seth R Johnson 2022-02-10 07:18:43 -05:00 committed by Olly Betts
commit 2ecc5bc214
2 changed files with 5 additions and 1 deletions

View file

@ -3139,7 +3139,9 @@ c_declaration : c_decl {
n = nextSibling(n);
}
} else {
Swig_warning(WARN_PARSE_UNDEFINED_EXTERN,cparse_file, cparse_line,"Unrecognized extern type \"%s\".\n", $2);
if (!Equal($2,"C++")) {
Swig_warning(WARN_PARSE_UNDEFINED_EXTERN,cparse_file, cparse_line,"Unrecognized extern type \"%s\".\n", $2);
}
$$ = new_node("extern");
Setattr($$,"name",$2);
appendChild($$,firstChild($5));