fix warning for forward base class
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6876 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bb374f4a49
commit
25d65e6ce9
2 changed files with 8 additions and 1 deletions
|
|
@ -3116,6 +3116,8 @@ cpp_forward_class_decl : storage_class cpptype idcolon SEMI {
|
||||||
$$ = 0;
|
$$ = 0;
|
||||||
} else {
|
} else {
|
||||||
$$ = new_node("classforward");
|
$$ = new_node("classforward");
|
||||||
|
Setfile($$,cparse_file);
|
||||||
|
Setline($$,cparse_line);
|
||||||
Setattr($$,"kind",$2);
|
Setattr($$,"kind",$2);
|
||||||
Setattr($$,"name",$3);
|
Setattr($$,"name",$3);
|
||||||
Setattr($$,"sym:weak", "1");
|
Setattr($$,"sym:weak", "1");
|
||||||
|
|
@ -5053,6 +5055,8 @@ base_list : base_specifier {
|
||||||
|
|
||||||
base_specifier : opt_virtual idcolon {
|
base_specifier : opt_virtual idcolon {
|
||||||
$$ = NewHash();
|
$$ = NewHash();
|
||||||
|
Setfile($$,cparse_file);
|
||||||
|
Setline($$,cparse_line);
|
||||||
Setattr($$,"name",$2);
|
Setattr($$,"name",$2);
|
||||||
if (last_cpptype && (Strcmp(last_cpptype,"struct") != 0)) {
|
if (last_cpptype && (Strcmp(last_cpptype,"struct") != 0)) {
|
||||||
Setattr($$,"access","private");
|
Setattr($$,"access","private");
|
||||||
|
|
@ -5064,6 +5068,8 @@ base_specifier : opt_virtual idcolon {
|
||||||
}
|
}
|
||||||
| opt_virtual access_specifier opt_virtual idcolon {
|
| opt_virtual access_specifier opt_virtual idcolon {
|
||||||
$$ = NewHash();
|
$$ = NewHash();
|
||||||
|
Setfile($$,cparse_file);
|
||||||
|
Setline($$,cparse_line);
|
||||||
Setattr($$,"name",$4);
|
Setattr($$,"name",$4);
|
||||||
Setattr($$,"access",$2);
|
Setattr($$,"access",$2);
|
||||||
if (Strcmp($2,"public") != 0) {
|
if (Strcmp($2,"public") != 0) {
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,8 @@ class TypePass : private Dispatcher {
|
||||||
if (Strcmp(nodeType(bcls),"classforward") != 0) {
|
if (Strcmp(nodeType(bcls),"classforward") != 0) {
|
||||||
Swig_error(Getfile(bname),Getline(bname),"'%s' is not a class. \n",bname);
|
Swig_error(Getfile(bname),Getline(bname),"'%s' is not a class. \n",bname);
|
||||||
} else {
|
} else {
|
||||||
Swig_warning(WARN_TYPE_INCOMPLETE,Getfile(bname),Getline(bname),"Base class '%s' is incomplete.\n", bname);
|
Swig_warning(WARN_TYPE_INCOMPLETE,Getfile(cls),Getline(cls),"Base class '%s' is incomplete.\n", bname);
|
||||||
|
Swig_warning(WARN_TYPE_INCOMPLETE,Getfile(bcls),Getline(bcls),"Only forward declaration '%s' was found.\n", bname);
|
||||||
clsforward = 1;
|
clsforward = 1;
|
||||||
}
|
}
|
||||||
bcls = 0;
|
bcls = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue