Don't issue unnecessary base class ignored message
Don't warn about base class being ignored when the derived class is itself ignored. Closes #669
This commit is contained in:
parent
e28b7f1fcf
commit
3efdbc8f2e
4 changed files with 28 additions and 1 deletions
|
|
@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
|
||||||
Version 3.0.9 (in progress)
|
Version 3.0.9 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2016-05-02: wsfulton
|
||||||
|
Fix #669. Don't issue warning about ignoring base classes when the derived class is
|
||||||
|
itself ignored.
|
||||||
|
|
||||||
2016-04-18: ianlancetaylor
|
2016-04-18: ianlancetaylor
|
||||||
[Go] Fix use of goout typemap when calling base method by
|
[Go] Fix use of goout typemap when calling base method by
|
||||||
forcing the "type" attribute to the value we need.
|
forcing the "type" attribute to the value we need.
|
||||||
|
|
|
||||||
19
Examples/test-suite/errors/cpp_inherit_ignored.i
Normal file
19
Examples/test-suite/errors/cpp_inherit_ignored.i
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
%module xxx
|
||||||
|
|
||||||
|
// Only non-ignored classes should warn about Ignored base classes
|
||||||
|
%ignore ActualClass;
|
||||||
|
%ignore ActualClassNoTemplates;
|
||||||
|
|
||||||
|
%{
|
||||||
|
struct BaseClassNoTemplates {};
|
||||||
|
%}
|
||||||
|
%inline %{
|
||||||
|
template<typename T>
|
||||||
|
class TemplateClass {};
|
||||||
|
|
||||||
|
class ActualClass : public TemplateClass<int> {};
|
||||||
|
class AktuelKlass : public TemplateClass<int> {};
|
||||||
|
|
||||||
|
class ActualClassNoTemplates : public BaseClassNoTemplates {};
|
||||||
|
class AktuelKlassNoTemplates : public BaseClassNoTemplates {};
|
||||||
|
%}
|
||||||
3
Examples/test-suite/errors/cpp_inherit_ignored.stderr
Normal file
3
Examples/test-suite/errors/cpp_inherit_ignored.stderr
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
cpp_inherit_ignored.i:15: Warning 401: Nothing known about base class 'TemplateClass< int >'. Ignored.
|
||||||
|
cpp_inherit_ignored.i:15: Warning 401: Maybe you forgot to instantiate 'TemplateClass< int >' using %template.
|
||||||
|
cpp_inherit_ignored.i:18: Warning 401: Nothing known about base class 'BaseClassNoTemplates'. Ignored.
|
||||||
|
|
@ -503,7 +503,8 @@ class TypePass:private Dispatcher {
|
||||||
/* Inherit type definitions into the class */
|
/* Inherit type definitions into the class */
|
||||||
if (name && !(GetFlag(n, "nested") && !checkAttribute(n, "access", "public") &&
|
if (name && !(GetFlag(n, "nested") && !checkAttribute(n, "access", "public") &&
|
||||||
(GetFlag(n, "feature:flatnested") || Language::instance()->nestedClassesSupport() == Language::NCS_None))) {
|
(GetFlag(n, "feature:flatnested") || Language::instance()->nestedClassesSupport() == Language::NCS_None))) {
|
||||||
cplus_inherit_types(n, 0, nname ? nname : (fname ? fname : name));
|
if (!GetFlag(n, "feature:ignore"))
|
||||||
|
cplus_inherit_types(n, 0, nname ? nname : (fname ? fname : name));
|
||||||
}
|
}
|
||||||
|
|
||||||
inclass = n;
|
inclass = n;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue