Fix regression parsing gcc preprocessor linemarkers
These are preprocessor statement in the form: # linenum filename flags Closes #1475
This commit is contained in:
parent
9038a9987d
commit
1f46d9b7b9
8 changed files with 70 additions and 1 deletions
14
Examples/test-suite/errors/pp_unknowndirective3.i
Normal file
14
Examples/test-suite/errors/pp_unknowndirective3.i
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
%module xxx
|
||||
|
||||
// Testing is_digits detecting gcc linemarkers
|
||||
|
||||
// These are valid
|
||||
# 1 "/usr/include/stdc-predef.h" 1 3 4
|
||||
# 123 "header1.h"
|
||||
|
||||
// These are invalid
|
||||
#a1 'a.h'
|
||||
#1b 'b.h'
|
||||
#1c1 'c.h'
|
||||
#d1d 'd.h'
|
||||
|
||||
4
Examples/test-suite/errors/pp_unknowndirective3.stderr
Normal file
4
Examples/test-suite/errors/pp_unknowndirective3.stderr
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
pp_unknowndirective3.i:10: Error: Unknown SWIG preprocessor directive: a1 (if this is a block of target language code, delimit it with %{ and %})
|
||||
pp_unknowndirective3.i:11: Error: Unknown SWIG preprocessor directive: 1b (if this is a block of target language code, delimit it with %{ and %})
|
||||
pp_unknowndirective3.i:12: Error: Unknown SWIG preprocessor directive: 1c1 (if this is a block of target language code, delimit it with %{ and %})
|
||||
pp_unknowndirective3.i:13: Error: Unknown SWIG preprocessor directive: d1d (if this is a block of target language code, delimit it with %{ and %})
|
||||
Loading…
Add table
Add a link
Reference in a new issue