Commit graph

60 commits

Author SHA1 Message Date
Vadim Zeitlin
300ccce46c Another merge with master.
Change Doxygen error codes to start at 740 instead of at 720 as the latter was
taken by Scilab in the meanwhile.

Resolve conflicts in autodoc_runme.py once again.
2015-02-16 23:46:39 +01:00
Olly Betts
be4065531e Add suggestion to check block delimiter
The fix for #217 means that blocks of target code delimited by { } with
'#' comments in now give errors (previously these lines were quietly
discarded).

The fix is generally to use %{ %} delimiters instead, so suggest this
might be the issue in the error message to help users hitting this issue
with wrappers which were apparently working before.
2015-01-14 16:08:08 +13:00
Olly Betts
a2f803bb5a Add explanatory comment to pp_unknowndirective2.i 2015-01-14 16:00:40 +13:00
Olly Betts
02b10195fc Add regression test for #217 2015-01-12 22:33:15 +13:00
William S Fulton
af43f90484 Wording change for missing semicolon error 2015-01-08 23:37:52 +00:00
Olly Betts
62670e756e Improve errors for missing ; and unexpected ) 2015-01-08 15:27:57 +13:00
Olly Betts
8fbdd75a0b Add test coverage for unterminated %{ ... %} block 2015-01-08 13:26:39 +13:00
Olly Betts
ce90ff6a77 When reporting an error for a construct which hasn't been terminated
when the end of the file is reached, report it at the start line rather
than "EOF" as then tools like editors and IDEs will take you to a
generally more useful place for fixing the problem.
2015-01-08 13:19:17 +13:00
Olly Betts
51487c1acc Improve error message for extraneous '%}'. 2015-01-08 12:47:12 +13:00
Olly Betts
19961d7135 Add .gitignore for Examples/test-suite/errors/ 2015-01-08 12:25:47 +13:00
Olly Betts
809ebef1f8 Fix testcase name in expected output 2015-01-08 12:21:23 +13:00
Olly Betts
04715f74e2 Improve error message when an unknown SWIG directive is used
This previously gave the cryptic "Error: Syntax error in input(1).", but
now gives "Error: Unknown directive '%foo'."
2015-01-08 12:07:54 +13:00
Vadim Zeitlin
9b857e6cf1 Merge latest master into doxygen branch. 2014-12-15 02:55:26 +01:00
Olly Betts
6eaec9ce7c Update expected output for pp_constant error test 2014-09-04 09:29:20 -03:00
Olly Betts
b9fe7b5f00 Disable case in pp_constant.i which never actually worked 2014-09-03 17:18:11 -03:00
Vadim Zeitlin
a1d7930835 Give warnings for unknown Doxygen commands in Doxygen parser.
Silently ignoring unknown Doxygen commands is not a reasonable default
behaviour, it's simple enough to turn off the warning if the command is really
supposed to be just ignored, but it's too easy to not notice a real problem if
it isn't.

Turn WARN_DOXYGEN_UNKNOWN_COMMAND on by default and add a test to the errors
test suite checking that it is indeed given.
2014-09-03 17:28:10 +02:00
William S Fulton
b71eb53bae Fix errors test-suite on windows 2014-05-29 11:47:38 +01:00
Karl Wette
3fe1eb7056 Set SRCDIR when calling test-suite clean targets, in case it's needed 2014-05-29 02:29:27 +02:00
William S Fulton
8ece62b945 Neaten up test-suite Makefile regeneration 2014-05-15 23:11:08 +01:00
William S Fulton
2b5499a262 Slight simplification of test-suite build for new out-of-source changes
Provide default SRCDIR and SCRIPTDIR variables in common.mk and override
only where needed.
2014-05-15 23:11:07 +01:00
Karl Wette
f574a34155 Allow examples and test-suite to be built out of source tree
- Examples/Makefile.in rules use SRCDIR as the relative source directory

- ./config.status replicates Examples/ source directory tree in build
  directory, and copies each Makefile to build directory, prefixed with
  a header which sets SRCDIR to source directory

- Examples/test-suite/.../Makefile.in set SRCDIR from Autoconf-set srcdir

- Examples/test-suite/errors/Makefile.in needs to filter out source
  directory from SWIG error messages

- Lua: embedded interpreters are passed location of run-time test

- Python: copy run-time scripts to build directory because of 2to3
  conversion; import_packages example copies __init__.py from source
  directory; test-suite sets SCRIPTDIR to location of run-time tests

- Javascript: binding.gyp renamed to binding.gyp.in so that $srcdir
  can be substituted with SRCDIR; removed './' from require() statements
  so that NODE_PATH can be used to point Node.js to build directory
2014-05-11 23:21:10 +02:00
Karl Wette
96153c7c0a Regenerate configured Makefile if Makefile.in or config.status have changed 2014-05-11 21:31:32 +02:00
Karl Wette
d5b765d388 Whitespace cleanup of all Makefiles*
- some of the %.clean rules in the test-suite Makefiles were using a single tab
  as an empty rule, dangerous! I've replaced these with the safer '@exit 0'.
2014-05-02 20:06:11 +02:00
William S Fulton
aa4b14a3d2 Fix seg fault with extra ) brackets and >> 2014-04-08 19:19:44 +01:00
William S Fulton
e442903fde Fix segfault when there are too many closing round brackets in parsed code 2014-04-05 00:18:30 +01:00
William S Fulton
f999c4864e Fix errors test-suite on Mac OSX 2014-03-16 15:20:13 +00:00
William S Fulton
13aac0dca9 Portability fixes for errors test-suite 2014-03-15 18:23:02 +00:00
William S Fulton
91f4828a4a Fix missing fragment name in warning message about missing fragment 2014-02-22 01:04:50 +00:00
William S Fulton
60501fe077 Errors tests more visibly show failures as the output of diff
diff -u would be better, but it is not posix, so diff -e is chosen as
second best choice.
2014-02-16 15:16:40 +00:00
Vladimir Kalinin
54b2346c71 error order foxed 2014-02-05 02:30:48 +04:00
Vladimir Kalinin
b7fd1eacb2 WARN_PARSE_UNNAMED_NESTED_CLASS check fixed 2014-02-03 02:50:19 +04:00
William S Fulton
3055a21505 Errors test-suite overhaul
Use makefiles instead of a make.sh script
Expected results are in individual .stderr files instead of the expected.log file
Add errors test-suite to Travis testing and 'make check'
2014-01-19 00:12:12 +00:00
William S Fulton
9d003ab362 Update errors expected results 2014-01-16 19:30:48 +00:00
William S Fulton
82990df573 Error test-suite updated for nested changes
WARN_DEPRECATED_NESTED_WORKAROUND test added
WARN_PARSE_NAMED_NESTED_CLASS test removed
2013-12-19 18:23:28 +00:00
William S Fulton
d1b40b468b Fix C code where a typedef name was used for constructor and destructor names in %extend. Deprecate use of typedef names for constructor and destructor names going forwards. 2013-02-18 22:40:42 +00:00
William S Fulton
b80f4dc5e2 Restrict the name used in %extend to be just the struct/class name and not a typedef to a class/struct. Typedefs were only partially working anyway. Anonymous struct typedefs excluded. Deprecate with a warning for now. 2013-02-18 19:53:37 +00:00
William S Fulton
093dc60d2d Fix garbage line number and empty file name reporting for some '}' or ')' error messages
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13976 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-16 13:56:50 +00:00
William S Fulton
bc43673a86 Add new warning if an empty template declaration is used on a base class, minor docs improvement for empty template declarations.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13840 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-14 22:25:35 +00:00
William S Fulton
55bda8f9f2 Fix seg fault attempting to warn about illegal destructors - introduced in rev 13111
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13128 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-05-28 06:20:45 +00:00
William S Fulton
bb3528c480 Expand special variables in typemap warnings - rework implementation
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12833 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-03 20:31:35 +00:00
William S Fulton
3c1ca906ac Expand special variables in typemap warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12832 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-03 19:41:09 +00:00
William S Fulton
4c6f66577a Add warnings for badly named destructors. Fix %extend and destructors for templates - they weren't always being wrapped. Fix destructor "name" attribute.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12804 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-09-13 06:15:29 +00:00
William S Fulton
30206f975c Fix constructors in named typedef class declarations
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-25 19:27:38 +00:00
William S Fulton
c8b89bd075 Fix partial overloading warning messages appearing
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12527 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-11 22:36:59 +00:00
William S Fulton
0913f41fb4 Change preprocessing error for tokens appearing after #else and #end to warning. Add some missing warning documentation and a couple of warning messages tidy up.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12467 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-17 21:54:13 +00:00
William S Fulton
efd06d0668 Preprocessing now errors out if extra tokens appear after #else and #end. Add preprocessor errors when preprocessor expressions are missing
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12464 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-16 20:48:48 +00:00
William S Fulton
4f616b5942 SF #3127633 Fix infinite loop in recursive typedef resolution.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12433 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-05 01:09:40 +00:00
William S Fulton
3d7799fe0d New warning when the smartptr feature is missing in some classes in an inheritance chain. Errors test-suite now uses Python instead of Tcl as testing language
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12395 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-17 21:12:35 +00:00
William S Fulton
31af118c41 Move Swig_locator from scanner.c to cscanner.c. Fix file and line error/warning reporting fixes where SWIG macros are used within {} braces (where the preprocessor expands macros), for example macros within %inline {...} and %fragment(...) {...} and nested structs. Basically anything that results ina call to skip_balanced() in the parser/preprocessor.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12227 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-24 22:13:13 +00:00
William S Fulton
b01277a19b Various inherited class warning/error line number fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12223 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-18 01:14:21 +00:00