Merge branch 'wkalinin-nested-ignore'
* wkalinin-nested-ignore:
Restore warning suppression in testcase
Typo in comment fix
warnings suppressed for deeply nested classes
nested nested class warning filtered
warning filter fixed
error order foxed
WARN_PARSE_UNNAMED_NESTED_CLASS check fixed
more warnings removed
warnfilter fixed scoping for "anonymous forward declaration" fixed
%feature ("flatnested") is set for nested scope test
added forward declaration instead of ignored nested class (resurrected old code)
filtered warnings, turned on "flatnested" for nested template test
Nested classes support is diversified, depending on the language capability. If the language cannot support nested classes, they will be unconditionally moved to the global namespace. If language module does not override Language::nestedClassesSupport() function, nested classes will be ignored, unless "feature:flatnested" is used.
This commit is contained in:
commit
98364d46da
18 changed files with 155 additions and 31 deletions
|
|
@ -3,6 +3,11 @@ This was reported in bug #909389 */
|
|||
|
||||
%module derived_nested
|
||||
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::CC;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::DD;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::EE;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::FF;
|
||||
|
||||
%inline %{
|
||||
|
||||
class A {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
cpp_macro_locator.i:66: Warning 204: CPP #warning, "inline warning message one".
|
||||
cpp_macro_locator.i:96: Warning 204: CPP #warning, "an inline warning message 2".
|
||||
cpp_macro_locator.i:50: Warning 325: Nested struct not currently supported (Inner ignored)
|
||||
cpp_macro_locator.i:53: Warning 509: Overloaded method overload1(int const *) effectively ignored,
|
||||
cpp_macro_locator.i:52: Warning 509: as it is shadowed by overload1(int *).
|
||||
cpp_macro_locator.i:61: Warning 509: Overloaded method overload2(int const *) effectively ignored,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
%module namespace_class
|
||||
|
||||
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Ala::Ola;
|
||||
|
||||
#ifdef SWIGD
|
||||
%warnfilter(SWIGWARN_IGNORE_OPERATOR_LT);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
%module namespace_union
|
||||
|
||||
#pragma SWIG nowarn=SWIGWARN_PARSE_UNNAMED_NESTED_CLASS
|
||||
|
||||
%inline %{
|
||||
namespace SpatialIndex
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,25 @@
|
|||
%module nested_class
|
||||
|
||||
#pragma SWIG nowarn=SWIGWARN_PARSE_UNNAMED_NESTED_CLASS
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerStruct1;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerClass1;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerUnion1;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerClass2;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerStruct2;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerUnion2;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerClass4Typedef;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerStruct4Typedef;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerUnion4Typedef;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerClass5;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerStruct5;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerUnion5;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerMultiple;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerMultipleDerived;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerMultipleAnonTypedef1;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerMultipleNamedTypedef;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerSameName;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer2::IgnoreMe;
|
||||
|
||||
%inline %{
|
||||
struct Outer {
|
||||
typedef int Integer;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
%module nested_comment
|
||||
|
||||
#pragma SWIG nowarn=SWIGWARN_PARSE_UNNAMED_NESTED_CLASS
|
||||
|
||||
// this example shows a problem with 'dump_nested' (parser.y).
|
||||
|
||||
// bug #949654
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
%module nested_scope
|
||||
|
||||
#if !defined(SWIGCSHARP) && !defined(SWIGJAVA)
|
||||
%feature ("flatnested");
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
namespace ns {
|
||||
struct Global {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
%module template_nested
|
||||
|
||||
#if !defined(SWIGCSHARP) && !defined(SWIGJAVA)
|
||||
%feature ("flatnested");
|
||||
#endif
|
||||
|
||||
// Test nested templates - that is template classes and template methods within a class.
|
||||
|
||||
namespace ns {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
%warnfilter(SWIGWARN_RUBY_WRONG_NAME) nRState; // Ruby, wrong class name
|
||||
%warnfilter(SWIGWARN_RUBY_WRONG_NAME) nRState_rstate; // Ruby, wrong class name
|
||||
#pragma SWIG nowarn=SWIGWARN_PARSE_UNNAMED_NESTED_CLASS
|
||||
|
||||
%inline %{
|
||||
class nRState {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue