Fix #2149523 - Incorrect line number reporting in errors after parsing macros. Remove extraneous extra line in preprocessed output which would sometimes lead to error/warning messages two lines after the end of the file
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12211 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f6cd7912e3
commit
122bc852f9
6 changed files with 73 additions and 9 deletions
|
|
@ -26,13 +26,15 @@ c_varargs
|
|||
c_varargs_neg
|
||||
nomodule
|
||||
pp_badeval
|
||||
pp_deprecated
|
||||
pp_constant
|
||||
pp_defined
|
||||
pp_macro_defined_unterminated
|
||||
pp_deprecated
|
||||
pp_illegal_argument
|
||||
pp_macro_args
|
||||
pp_macro_badchar
|
||||
pp_macro_defined_unterminated
|
||||
pp_macro_expansion
|
||||
pp_macro_inline_unterminated
|
||||
pp_macro_nargs
|
||||
pp_macro_redef
|
||||
pp_macro_rparen
|
||||
|
|
|
|||
43
Examples/test-suite/errors/pp_constant.i
Normal file
43
Examples/test-suite/errors/pp_constant.i
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
%module xxx
|
||||
|
||||
/* Test preprocessor comments and their effect on line number reporting on later errors */
|
||||
|
||||
#define A1 1234
|
||||
#define A2 1234 /*C comment*/
|
||||
#define A3 1234
|
||||
|
||||
%constant int aaa=;
|
||||
|
||||
#define B1 1234
|
||||
#define B2 1234 //C++ comment
|
||||
#define B3 1234
|
||||
|
||||
%constant int bbb=;
|
||||
|
||||
#define C1 1234
|
||||
#define C2 1234 /*multiline
|
||||
C
|
||||
comment */
|
||||
#define C3 1234
|
||||
|
||||
%constant int ccc=;
|
||||
|
||||
#define D1 1234
|
||||
#define /*C Comment*/ D2 1234
|
||||
#define D3 1234
|
||||
|
||||
%constant int ddd=;
|
||||
|
||||
#define E1 1234
|
||||
#/*C comment*/define E2 1234
|
||||
#define E3 1234
|
||||
|
||||
%constant int eee=;
|
||||
|
||||
#define F1 1234
|
||||
#define F2 1234 \
|
||||
// C comment
|
||||
#define F3 1234
|
||||
|
||||
%constant int fff=;
|
||||
|
||||
11
Examples/test-suite/errors/pp_macro_inline_unterminated.i
Normal file
11
Examples/test-suite/errors/pp_macro_inline_unterminated.i
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
%module xxx
|
||||
|
||||
%define foo(a,x)
|
||||
int ii;
|
||||
%enddef
|
||||
|
||||
%inline %{
|
||||
struct Struct {
|
||||
foo(2,
|
||||
};
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue