Fix incorrect line number reporting in errors/warnings after parsing macro invocations with parameters given over more than one line.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12214 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4435fe4f4a
commit
f82811dbcd
5 changed files with 50 additions and 0 deletions
|
|
@ -106,6 +106,12 @@ pp_macro_defined_unterminated.i:4: Error: Unterminated call to 'defined'
|
|||
:::::::::::::::::::::::::::::::: pp_macro_expansion.i :::::::::::::::::::::::::::::::::::
|
||||
pp_macro_expansion.i:9: Error: Macro 'MACRO2' expects 2 arguments
|
||||
|
||||
:::::::::::::::::::::::::::::::: pp_macro_expansion_multiline.i :::::::::::::::::::::::::::::::::::
|
||||
pp_macro_expansion_multiline.i:13: Warning 509: Overloaded method foo(int const *) effectively ignored,
|
||||
pp_macro_expansion_multiline.i:12: Warning 509: as it is shadowed by foo(int *).
|
||||
pp_macro_expansion_multiline.i:31: Warning 509: Overloaded method bar(int const *) effectively ignored,
|
||||
pp_macro_expansion_multiline.i:30: Warning 509: as it is shadowed by bar(int *).
|
||||
|
||||
:::::::::::::::::::::::::::::::: pp_macro_inline_unterminated.i :::::::::::::::::::::::::::::::::::
|
||||
pp_macro_inline_unterminated.i:9: Error: Unterminated call invoking macro 'foo'
|
||||
pp_macro_inline_unterminated.i:12: Error: Syntax error in input(3).
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ pp_macro_args
|
|||
pp_macro_badchar
|
||||
pp_macro_defined_unterminated
|
||||
pp_macro_expansion
|
||||
pp_macro_expansion_multiline
|
||||
pp_macro_inline_unterminated
|
||||
pp_macro_nargs
|
||||
pp_macro_redef
|
||||
|
|
|
|||
32
Examples/test-suite/errors/pp_macro_expansion_multiline.i
Normal file
32
Examples/test-suite/errors/pp_macro_expansion_multiline.i
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
%module xxx
|
||||
// Testing macros split over multiple lines - ensure the warning message for the ignored functions contain the correct line numbering
|
||||
|
||||
#define MYMACRO(NAME, A, B, C) void NAME(int A, int B, int C);
|
||||
|
||||
MYMACRO(funk, x,
|
||||
y,
|
||||
|
||||
z
|
||||
)
|
||||
|
||||
void foo(int *);
|
||||
void foo(const int *);
|
||||
|
||||
%define MYSWIGMACRO(A, B, C)
|
||||
MYMACRO(funk1,
|
||||
AA,
|
||||
BB,
|
||||
CC)
|
||||
MYMACRO(funk2,
|
||||
AA,
|
||||
BB,
|
||||
CC)
|
||||
%enddef
|
||||
|
||||
MYSWIGMACRO(xx,
|
||||
yy,
|
||||
zz)
|
||||
|
||||
void bar(int *);
|
||||
void bar(const int *);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue