Commit Graph

5 Commits

Author SHA1 Message Date
William S Fulton 52ede59cdf Reword and simplify warnings 302 and 322
The declaration is not displayed in the warning if it is the same as the
identifier.
2023-07-28 07:16:49 +01:00
William S Fulton 7cea399cba Correct display of class names in Warnings 302 and 322 2023-07-28 07:15:41 +01:00
William S Fulton 856d6f25e9 Redefinition/redeclaration warning message improvements
Add more information to these warning messages, including the
declaration for easier identification of the conflicting symbols.
Provides more consistent identifier names for constructors and methods.
Previously constructors did not display the template parameters, whereas
methods did. Incorrect 'renamed from' was also been shown for templated
methods (mmm in new testcase cpp_template_redefine.i).
2023-07-25 21:39:52 +01:00
William S Fulton 4729cf2b1f Duplicate class template instantiations via %template changes
Named duplicate class template instantiations now issue a warning and are ignored.
Duplicate empty class template instantiations are quietly ignored.

The test cases are fixed for this new behaviour.

This commit is a pre-requisite for the near future so that the Python
builtin wrappers can correctly use the SwigType_namestr function without
generating duplicate symbol names.
2022-11-18 19:35:47 +00:00
William S Fulton e27a606335 Allow an instantiated template to have the same name as the C++ template name
For example, this is now possible:
  template<typename T> struct X { ... };
  %template(X) X<int>;
Closes #1100.
2017-09-29 23:28:04 +01:00