Fix warning display of types associated with 'using' and templates.

This commit is contained in:
William S Fulton 2015-06-09 07:54:47 +01:00
commit efa84dab7c
3 changed files with 20 additions and 4 deletions

View file

@ -0,0 +1,13 @@
%module cpp_using_type_aliasing
namespace Space {
template<typename T> struct Okay {
};
struct User {
protected:
using OkayInt = Okay<int>;
};
struct Derived : User {
Okay<OkayInt> ff();
};
};

View file

@ -0,0 +1,3 @@
cpp_using_type_aliasing.i:8: Warning 341: The 'using' keyword in type aliasing is not fully supported yet.
cpp_using_type_aliasing.i:8: Warning 315: Nothing known about 'Okay< int >'.
cpp_using_type_aliasing.i:8: Warning 315: Nothing known about 'Okay< int >'.

View file

@ -1149,7 +1149,7 @@ Node *Swig_symbol_clookup(const_String_or_char_ptr name, Symtab *n) {
Symtab *un = Getattr(s, "sym:symtab");
Node *ss = (!Equal(name, uname) || (un != n)) ? Swig_symbol_clookup(uname, un) : 0; /* avoid infinity loop */
if (!ss) {
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", Getattr(s, "uname"));
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", SwigType_namestr(Getattr(s, "uname")));
}
s = ss;
}
@ -1221,7 +1221,7 @@ Node *Swig_symbol_clookup_check(const_String_or_char_ptr name, Symtab *n, int (*
Node *ss;
ss = Swig_symbol_clookup(Getattr(s, "uname"), Getattr(s, "sym:symtab"));
if (!ss && !checkfunc) {
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", Getattr(s, "uname"));
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", SwigType_namestr(Getattr(s, "uname")));
}
s = ss;
}
@ -1272,7 +1272,7 @@ Node *Swig_symbol_clookup_local(const_String_or_char_ptr name, Symtab *n) {
while (s && Checkattr(s, "nodeType", "using")) {
Node *ss = Swig_symbol_clookup_local(Getattr(s, "uname"), Getattr(s, "sym:symtab"));
if (!ss) {
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", Getattr(s, "uname"));
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", SwigType_namestr(Getattr(s, "uname")));
}
s = ss;
}
@ -1320,7 +1320,7 @@ Node *Swig_symbol_clookup_local_check(const_String_or_char_ptr name, Symtab *n,
while (s && Checkattr(s, "nodeType", "using")) {
Node *ss = Swig_symbol_clookup_local_check(Getattr(s, "uname"), Getattr(s, "sym:symtab"), checkfunc);
if (!ss && !checkfunc) {
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", Getattr(s, "uname"));
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", SwigType_namestr(Getattr(s, "uname")));
}
s = ss;
}