-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4198 from masatake/cpreprocessor--rich-ungetstr
CPreProcessor: adjust line numbers when reading characters from unget-chars-buffer
- Loading branch information
Showing
24 changed files
with
757 additions
and
316 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
Units/parser-asm.r/asm-cpp-macro-expansion-with-multi-line-args-last-items.b/args.ctags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--sort=no | ||
--param-Asm.useCPreProcessor=1 | ||
--param-CPreProcessor._expand=1 | ||
--fields=+{signature}{line} | ||
--fields-CPreProcessor=+{macrodef} | ||
--param-Asm.commentCharsAtBOL=# | ||
--param-Asm.extraLinesepChars=; |
7 changes: 7 additions & 0 deletions
7
Units/parser-asm.r/asm-cpp-macro-expansion-with-multi-line-args-last-items.b/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ENTRY input.S /^#define ENTRY(/;" d line:1 file: signature:(SYMBOL,LABEL) macrodef:.global SYMBOL ;LABEL: nop | ||
E input.S /^ENTRY($/;" s line:6 | ||
F input.S /^ F)$/;" l line:7 | ||
G input.S /^ENTRY($/;" s line:10 | ||
H input.S /^ )$/;" l line:11 | ||
I input.S /^ENTRY($/;" s line:15 | ||
J input.S /^ )$/;" l line:16 |
18 changes: 18 additions & 0 deletions
18
Units/parser-asm.r/asm-cpp-macro-expansion-with-multi-line-args-last-items.b/input.S
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#define ENTRY(SYMBOL,LABEL) .global SYMBOL ;\ | ||
LABEL: \ | ||
nop | ||
|
||
ENTRY( | ||
E, | ||
F) | ||
|
||
ENTRY( | ||
G, | ||
H | ||
) | ||
|
||
ENTRY( | ||
I, | ||
J,K, | ||
L | ||
) |
2 changes: 1 addition & 1 deletion
2
Units/parser-asm.r/asm-cpp-macro-expansion-with-multi-line-args.d/args.ctags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--sort=no | ||
--param-Asm.useCPreProcessor=1 | ||
--param-CPreProcessor._expand=1 | ||
--fields=+{signature} | ||
--fields=+{signature}{line} | ||
--fields-CPreProcessor=+{macrodef} | ||
--param-Asm.commentCharsAtBOL=# | ||
--param-Asm.extraLinesepChars=; |
16 changes: 5 additions & 11 deletions
16
Units/parser-asm.r/asm-cpp-macro-expansion-with-multi-line-args.d/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
ENTRY input.S /^#define ENTRY(/;" d file: signature:(SYMBOL,LABEL) macrodef:.global SYMBOL ;LABEL: nop | ||
A input.S /^ENTRY(A, B)$/;" s | ||
B input.S /^ENTRY(A, B)$/;" l | ||
C input.S /^ D)$/;" s | ||
D input.S /^ D)$/;" l | ||
E input.S /^ F)$/;" s | ||
F input.S /^ F)$/;" l | ||
G input.S /^ )$/;" s | ||
H input.S /^ )$/;" l | ||
I input.S /^ )$/;" s | ||
J input.S /^ )$/;" l | ||
ENTRY input.S /^#define ENTRY(/;" d line:1 file: signature:(SYMBOL,LABEL) macrodef:.global SYMBOL ;LABEL: nop | ||
A input.S /^ENTRY(A, B)$/;" s line:5 | ||
B input.S /^ENTRY(A, B)$/;" l line:5 | ||
C input.S /^ENTRY(C,$/;" s line:6 | ||
D input.S /^ D)$/;" l line:7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,3 @@ LABEL: \ | |
ENTRY(A, B) | ||
ENTRY(C, | ||
D) | ||
ENTRY( | ||
E, | ||
F) | ||
ENTRY( | ||
G, | ||
H | ||
) | ||
|
||
ENTRY( | ||
I, | ||
J,K, | ||
L | ||
) |
6 changes: 6 additions & 0 deletions
6
Units/parser-c.r/macroexpand-with-linenum-adjustment.d/args.ctags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--sort=no | ||
--fields=+ne | ||
-D SYSCALL_DEFINE3(name,...)=long name(__VA_ARGS__) | ||
--param-CPreProcessor._expand=1 | ||
--fields=+{signature} | ||
--fields-C=+{macrodef} |
8 changes: 8 additions & 0 deletions
8
Units/parser-c.r/macroexpand-with-linenum-adjustment.d/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
faccessat input.c /^SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)$/;" f line:1 typeref:typename:long signature:(int,dfd,const char __user *,filename,int,mode) end:4 | ||
fchmodat input.c /^SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename,$/;" f line:6 typeref:typename:long signature:(int,dfd,const char __user *,filename,umode_t,mode) end:10 | ||
mysyscall input.c /^ mysyscall, int, dfd,$/;" f line:16 typeref:typename:long signature:(int,dfd,const char __user *,filename,umode_t,mode) end:21 | ||
INJECT_MEMBERS input.c /^#define INJECT_MEMBERS(/;" d line:23 file: signature:(m0,m1) end:26 macrodef:int m0; int padding; int m1 | ||
P input.c /^struct P {$/;" s line:28 file: end:33 | ||
x input.c /^ x$/;" m line:30 struct:P typeref:typename:int file: | ||
padding input.c /^ INJECT_MEMBERS($/;" m line:29 struct:P typeref:typename:int file: end:29 | ||
y input.c /^ y);$/;" m line:32 struct:P typeref:typename:int file: end:32 |
33 changes: 33 additions & 0 deletions
33
Units/parser-c.r/macroexpand-with-linenum-adjustment.d/input.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode) | ||
{ | ||
return do_faccessat(dfd, filename, mode, 0); | ||
} | ||
|
||
SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, | ||
umode_t, mode) | ||
{ | ||
return do_fchmodat(dfd, filename, mode, 0); | ||
} | ||
|
||
SYSCALL_DEFINE3( | ||
/* | ||
* noise | ||
*/ | ||
mysyscall, int, dfd, | ||
const char __user *, filename, | ||
umode_t, mode) | ||
{ | ||
return 0; | ||
} | ||
|
||
#define INJECT_MEMBERS(m0, m1) \ | ||
int m0; \ | ||
int padding; \ | ||
int m1 | ||
|
||
struct P { | ||
INJECT_MEMBERS( | ||
x | ||
, | ||
y); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--sort=no | ||
--param-CPreProcessor._expand=1 | ||
--fields=+{signature}{roles}{line} | ||
--fields-CPreProcessor=+{macrodef} | ||
--extras=+r |
2 changes: 2 additions & 0 deletions
2
Units/parser-ldscript.r/lds-invalid-macro-call.d/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
S input.lds.S /^#define S(A) A: AT(ADDR(.altinstr_aux) - LOAD_OFFSE/;" d line:1 file: signature:(A) roles:def macrodef:A: AT(ADDR(.altinstr_aux) - LOAD_OFFSET) { *(A) } | ||
_etext input.lds.S /^ _etext = .;$/;" s line:7 roles:def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#define S(A) A: AT(ADDR(.altinstr_aux) - LOAD_OFFSET) { \ | ||
*(A) \ | ||
} | ||
|
||
SECTIONS | ||
{ | ||
_etext = .; | ||
S(.altinstr_aux | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--sort=no | ||
--param-CPreProcessor._expand=1 | ||
--fields=+{signature}{roles} | ||
--fields=+{signature}{roles}{line} | ||
--fields-CPreProcessor=+{macrodef} | ||
--extras=+r |
20 changes: 10 additions & 10 deletions
20
Units/parser-ldscript.r/lds-macro-expansion.d/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
MEM_DISCARD input.lds.S /^#define MEM_DISCARD(/;" d file: signature:(sec) roles:def macrodef:*(.mem##sec) | ||
INIT_TEXT input.lds.S /^#define INIT_TEXT(/;" d file: signature:(X,A) roles:def macrodef:*A *X MEM_DISCARD(init.text*) | ||
INIT_TEXT_SECTION input.lds.S /^#define INIT_TEXT_SECTION(/;" d file: signature:(inittext_align,Y,B) roles:def macrodef:. = ALIGN(inittext_align); .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { _sinittext = .; INIT_TEXT(Y,B) _einittext = .; } | ||
.init.text input.lds.S /^ INIT_TEXT_SECTION(PAGE_SIZE,(.text.startup),(.init.text .init.text.*))$/;" S roles:def | ||
_sinittext input.lds.S /^ INIT_TEXT_SECTION(PAGE_SIZE,(.text.startup),(.init.text .init.text.*))$/;" s section:.init.text roles:def | ||
.init.text input.lds.S /^ INIT_TEXT_SECTION(PAGE_SIZE,(.text.startup),(.init.text .init.text.*))$/;" i section:.init.text roles:mapped | ||
.init.text. input.lds.S /^ INIT_TEXT_SECTION(PAGE_SIZE,(.text.startup),(.init.text .init.text.*))$/;" i section:.init.text roles:mapped | ||
.text.startup input.lds.S /^ INIT_TEXT_SECTION(PAGE_SIZE,(.text.startup),(.init.text .init.text.*))$/;" i section:.init.text roles:mapped | ||
.meminit.text input.lds.S /^ INIT_TEXT_SECTION(PAGE_SIZE,(.text.startup),(.init.text .init.text.*))$/;" i section:.init.text roles:mapped | ||
_einittext input.lds.S /^ INIT_TEXT_SECTION(PAGE_SIZE,(.text.startup),(.init.text .init.text.*))$/;" s section:.init.text roles:def | ||
MEM_DISCARD input.lds.S /^#define MEM_DISCARD(/;" d line:4 file: signature:(sec) roles:def macrodef:*(.mem##sec) | ||
INIT_TEXT input.lds.S /^#define INIT_TEXT(/;" d line:6 file: signature:(X,A) roles:def macrodef:*A *X MEM_DISCARD(init.text*) | ||
INIT_TEXT_SECTION input.lds.S /^#define INIT_TEXT_SECTION(/;" d line:11 file: signature:(inittext_align,Y,B) roles:def macrodef:. = ALIGN(inittext_align); .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { _sinittext = .; INIT_TEXT(Y,B) _einittext = .; } | ||
.init.text input.lds.S /^ INIT_TEXT_SECTION(PAGE_SIZE$/;" S line:22 roles:def | ||
_sinittext input.lds.S /^ INIT_TEXT_SECTION(PAGE_SIZE$/;" s line:22 section:.init.text roles:def | ||
.init.text input.lds.S /^ (.init.text .init.text.*)$/;" i line:26 section:.init.text roles:mapped | ||
.init.text. input.lds.S /^ (.init.text .init.text.*)$/;" i line:26 section:.init.text roles:mapped | ||
.text.startup input.lds.S /^ (.text.startup)$/;" i line:24 section:.init.text roles:mapped | ||
.meminit.text input.lds.S /^ INIT_TEXT_SECTION(PAGE_SIZE$/;" i line:22 section:.init.text roles:mapped | ||
_einittext input.lds.S /^ INIT_TEXT_SECTION(PAGE_SIZE$/;" s line:22 section:.init.text roles:def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.