Commit graph

24 commits

Author SHA1 Message Date
Olly Betts
4a15f3934d Fix MSVC error in nested_class.i
MSVC now fails with:

error C4596: 'foo': illegal qualified name in member declaration

Such redundant qualification is invalid.  Compilers used to be
permissive here (so it's useful for SWIG to handle it), but compilers
increasingly complain about it so adjust the testcase to show the
compiler a valid version, and only test the redundant qualification
with SWIG.
2022-07-26 15:28:51 +12:00
William S Fulton
76d5a9ec27 gcc-12 warning fix in test-case
Closes #2145
2022-01-18 21:37:02 +00:00
Vladimir Kalinin
ec93b01a09 Issue #508: Classprefix is not restored after nested structures processing. Also, Classprefix is incorrectly checked in some places. 2015-10-01 15:06:42 +03:00
William S Fulton
a73a783fcd Warning suppression change
Earlier gcc (4.7) will warn about unknown warning pragmas!
-Wpedantic suppression is only available in 4.8 and later
2015-02-11 23:32:29 +00:00
William S Fulton
ec1eac5b72 Suppress pedantic warnings in testcases 2015-02-11 23:24:40 +00:00
Simon Marchetto
adc4b788df Merge remote-tracking branch 'origin/master' into gsoc2012-scilab
Conflicts:
	.gitignore
	.travis.yml
	configure.ac
2015-01-26 10:50:20 +01:00
William S Fulton
eec306c228 Test suite warning fixes 2014-12-28 10:38:12 +00:00
Simon Marchetto
35ff88709e scilab: fix tests having too long identifier names 2014-09-29 17:32:49 +02:00
Vladimir Kalinin
e9ecac9298 warnings suppressed for deeply nested classes 2014-02-07 07:39:07 +04:00
Vladimir Kalinin
6b5e366567 nested nested class warning filtered 2014-02-06 23:53:33 +04:00
Vladimir Kalinin
56cea1821d warning filter fixed 2014-02-06 23:47:01 +04:00
Vladimir Kalinin
0320378387 more warnings removed 2014-02-03 02:31:17 +04:00
Vladimir Kalinin
bda9c90e2b warnfilter fixed
scoping for "anonymous forward declaration" fixed
2014-02-03 02:21:44 +04:00
Vladimir Kalinin
69d849b56c filtered warnings, turned on "flatnested" for nested template test 2014-02-02 23:38:23 +04:00
Vladimir Kalinin
b4fef06c42 fixed %template within %extend, test added
fixed language symbol table nested classes name separator, test added
fixed %feature "flatnested" working with %extend
fixed Swig_offset_string for empty string
added simple template to save/restore values in current scope (readability reasons)
2013-12-19 02:11:22 +04:00
Vladimir Kalinin
b63c4839fe Nested classes support
Closes #89
Squash merge branch 'master' of https://github.com/wkalinin/swig into wkalinin-nested

By Vladimir Kalinin
* 'master' of https://github.com/wkalinin/swig:
  CPlusPlusOut mode for Octave
  nested class illustration
  fixed "Abstract" flag for nested classes added an example enabled anonymous nested structs runtime test
  porting
  warnings disabled
  porting fixes
  java runtime tests ported
  nested class closing bracket offset fixed
  removed double nested template (not supported by %template parsing)
  template_nested test extended
  parent field made public
  property access fixed
  replaced tabs with spaces
  warning W-reorder
  deprecated warnings removed, derived_nested runtime test added
  optimized string indenting
  Nested classes indenting
  nested classes docs
  fixed the order in which flattened inner classes are added after the outer
  Private nested classes were getting into the type table.
  Java getProxyName() fix for nested classes fixes the case when nested classes is forward declared
  Fix for a case when a nested class inherits from the same base as the outer. (Base class constructor declaration is found first in this case)
  merge fix
  nested C struct first immediate declaration incorrectly renamed sample fixed
  tests updated to reflect nested classes support
  Java nested classes support (1)
  flattening should remove the link to the outer class
  access mode correctly set/restored for nested classes
  nested templates should be skipped while flattening (template nodes themselves, not expanded versions) also non-public nested classes should be ignored
  If nested classes are not supported, default behaviour is flattening, not ignoring flag "nested" is preserved, so, the nested classes can be ignored by user
  nested workaround test updated
  template instantiated within a class is marked as nested for ignoring purposes
  %ignore not applied to the nested classed, because "nested" flag is set too late
  typedef name takes precedence over the real name (reason?)
  unnamed structs should be processed for all the languages
  nested C struct instances are wrapped as "immutable"
  tree building
  typedef declaration for unnamed C structures fixed
  nested classes "flattening"
  fixed %ignoring nested classes
  renamed "nested" attribute to "nested:outer" added "nested" flag, to be used with $ignore (it is not removed while flattening) added nestedClassesSupported() function to the Language interface
  renamed "nested" attribute to "nested:outer" added "nested" flag, to be used with $ignore (it is not removed while flattening) added nestedClassesSupported() function to the Language interface
  tree iteration fix
  dirclassname variable names unified memory issue fixed
  merge error
  ignore unnamed structs for C++
  unnamed nested C structs naming & unnesting
  class added to classes hash under typedef name
  private nested classes skipped
  test updated due to nested templates support
  anonymous structs with inheritance fixed nested_class test to allow anonymous structs w/o declarator
  tests updated: nested workaround removed from namespace_class.i propagated nested template declaration to the C++ file
  injected members scope
  nested tempplates fixes, nested structures in "C" mode parsing added utility function "appendSibling" (like "appendChild")
  nested unnamed structures parsing fixes, access mode restored on nested class end, tdname is properly patched with outer class name prefix
  memory management fixes
  nested templates (1)
  Nested unnamed structs
  Nested class support (1)
  Nested class support (1)
2013-11-29 07:02:34 +00:00
William S Fulton
90847fb49e Solaris warnings/errors testcase fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12505 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-20 19:29:50 +00:00
William S Fulton
2a59a2e6a9 Improved C++ nested class support - nested typedef'd classes now parsed and treated as forward class declaration
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11756 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-23 23:02:01 +00:00
William S Fulton
a9ccc5a866 Fix multiple declarations of nested structs (C code)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11753 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-18 20:24:06 +00:00
William S Fulton
aa61c716a8 Stop generating uncompileable code when using nested template classes in functions. Replace SWIGWARN_PARSE_NESTED_CLASS with SWIGWARN_PARSE_NAMED_NESTED_CLASS and SWIGWARN_PARSE_UNNAMED_NESTED_CLASS for named and unnamed nested classes respectively. Named nested class ignored warnings can now be suppressed by name using %warnfilter
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11735 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-12 19:47:04 +00:00
William S Fulton
ebed6508e4 Nested class improvements - Fixed inconsistency in handling C++ nested classes - sometimes they were treated as forward declarations, other times as if C nested struct was parsed. Added the nestedworkaround feature for C++ nested class handling. Document improved nested class handling. Numerous C and C++ nested struct/class/union test cases added.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11734 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-11 00:30:34 +00:00
William S Fulton
9b318c45bc inner declared types are treated as forward declarations - consistency now between innner/nested unions/structs and classes - only relevant to C++
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11730 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-08 20:45:48 +00:00
William S Fulton
99565a7c35 Add unions to the nested class test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11729 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-08 20:33:19 +00:00
William S Fulton
9d65c100b9 Ignored nested class/struct warnings now display the name of the ignored class/struct.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11728 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-08 01:18:45 +00:00