Skip to content

Commit 6c57fc0

Browse files
authored
Merge pull request #3547 from masatake/mixed-option--no-trunc
Fortran:CPreProcessor: don't make patterns too short when truncating
2 parents 4099472 + 5af1fd8 commit 6c57fc0

File tree

29 files changed

+43
-43
lines changed

29 files changed

+43
-43
lines changed

Units/parser-c.r/c-digraphs.d/expected.tags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
A input.c /^%:define A /;" d file:
22
B input.c /^%:define B /;" d file:
33
M3_INIT input.c /^%:define M3_INIT(/;" d file:
4-
STRINGIFY input.c /^%:define STRINGIFY(/;" d file:
4+
STRINGIFY input.c /^%:define STRINGIFY(x) STRINGIFY_/;" d file:
55
STRINGIFY_INTERN input.c /^%:define STRINGIFY_INTERN(/;" d file:
66
buf input.c /^ char *buf;$/;" m struct:str typeref:typename:char * file:
77
len input.c /^ unsigned int len, size;$/;" m struct:str typeref:typename:unsigned int file:

Units/parser-c.r/c-trigraphs.d/expected.tags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ D input.c /^??=define D /;" d file:
44
E input.c /^??=define E /;" d file:
55
F input.c /^??=define F /;" d file:
66
M3_INIT input.c /^??=define M3_INIT(/;" d file:
7-
STRINGIFY input.c /^??=define STRINGIFY(/;" d file:
7+
STRINGIFY input.c /^??=define STRINGIFY(x) STRINGIFY_/;" d file:
88
STRINGIFY_INTERN input.c /^??=define STRINGIFY_INTERN(/;" d file:
99
buf input.c /^ char *buf;$/;" m struct:str typeref:typename:char * file:
1010
len input.c /^ unsigned int len, size;$/;" m struct:str typeref:typename:unsigned int file:

Units/parser-c.r/macrodef.d/expected.tags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ SYSCALL_DEFINEx input.c /^#define SYSCALL_DEFINEx(/;" d language:C file: signatu
99
__SYSCALL_DEFINEx input.c /^#define __SYSCALL_DEFINEx(/;" d language:C file: signature:(x,name,...) macrodef:__diag_push(); __diag_ignore(GCC, 8, "-Wattribute-alias", "Type aliasing is used to sanitize syscall arguments"); asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) __attribute__((alias(__stringify(__se_sys##name)))); ALLOW_ERROR_INJECTION(sys##name, ERRNO); static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) { long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__)); __MAP(x,__SC_TEST,__VA_ARGS__); __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); return ret; } __diag_pop(); static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
1010
__MAP1 input.c /^#define __MAP1(/;" d language:C file: signature:(m,t,a,...) macrodef:m(t,a)
1111
__MAP2 input.c /^#define __MAP2(/;" d language:C file: signature:(m,t,a,...) macrodef:m(t,a), __MAP1(m,__VA_ARGS__)
12-
__MAP input.c /^#define __MAP(/;" d language:C file: signature:(n,...) macrodef:__MAP##n(__VA_ARGS__)
12+
__MAP input.c /^#define __MAP(n,...) __MAP#/;" d language:C file: signature:(n,...) macrodef:__MAP##n(__VA_ARGS__)
1313
__SC_DECL input.c /^#define __SC_DECL(/;" d language:C file: signature:(t,a) macrodef:t a

Units/parser-cpreprocessor.r/macrodef.d/expected.tags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SYSCALL_DEFINEx input.h /^#define SYSCALL_DEFINEx(/;" d language:CPreProcessor s
99
__SYSCALL_DEFINEx input.h /^#define __SYSCALL_DEFINEx(/;" d language:CPreProcessor signature:(x,name,...) macrodef:__diag_push(); __diag_ignore(GCC, 8, "-Wattribute-alias", "Type aliasing is used to sanitize syscall arguments"); asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) __attribute__((alias(__stringify(__se_sys##name)))); ALLOW_ERROR_INJECTION(sys##name, ERRNO); static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) { long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__)); __MAP(x,__SC_TEST,__VA_ARGS__); __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); return ret; } __diag_pop(); static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
1010
__MAP1 input.h /^#define __MAP1(/;" d language:CPreProcessor signature:(m,t,a,...) macrodef:m(t,a)
1111
__MAP2 input.h /^#define __MAP2(/;" d language:CPreProcessor signature:(m,t,a,...) macrodef:m(t,a), __MAP1(m,__VA_ARGS__)
12-
__MAP input.h /^#define __MAP(/;" d language:CPreProcessor signature:(n,...) macrodef:__MAP##n(__VA_ARGS__)
12+
__MAP input.h /^#define __MAP(n,...) __MAP#/;" d language:CPreProcessor signature:(n,...) macrodef:__MAP##n(__VA_ARGS__)
1313
__SC_DECL input.h /^#define __SC_DECL(/;" d language:CPreProcessor signature:(t,a) macrodef:t a
1414
slash_fn input.h /^#define slash_fn(/;" d language:CPreProcessor signature:(t) macrodef:t fn (t i, t j) { return i / j; }
1515
question_fn input.h /^#define question_fn(/;" d language:CPreProcessor signature:(t) macrodef:t fn (t i, t j) { return (i < j)? i: j; }

Units/parser-cpreprocessor.r/macroexpand.d/expected.tags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ T input-0.c /^#define T /;" d file: macrodef:int
1616
mytype0 input-0.c /^typedef T mytype0;$/;" t typeref:typename:int file:
1717
S input-0.c /^#define S /;" d file: macrodef:int
1818
mytype1 input-0.c /^typedef S mytype1;$/;" t typeref:typename:float file:
19-
IO7__POX_ERRSUM__UPE_ERROR input-1.c /^#define IO7__POX_ERRSUM__UPE_ERROR /;" d file: macrodef:GEN_MASK(IO7__POX_ERRSUM__UPE_ERROR)
19+
IO7__POX_ERRSUM__UPE_ERROR input-1.c /^#define IO7__POX_ERRSUM__UPE_ERROR GEN_MASK(IO7__POX_ERRSUM__UPE_ERROR)/;" d file: macrodef:GEN_MASK(IO7__POX_ERRSUM__UPE_ERROR)
2020
f input-1.c /^f(int err_sum)$/;" f typeref:typename:int signature:(int err_sum)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
bar input.f90 /^ subroutine bar /;" s module:foobar
2-
f input.f90 /^ real fu/;" f function:foo
2+
f input.f90 /^ real function f(/;" f function:foo
33
foo input.f90 /^ integer function foo /;" f module:foobar
44
foobar input.f90 /^module foobar$/;" m
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ADD_COMPONENTS input.f90 /^ SUBROUTINE ADD_COMPONENTS$/;" s module:MDCOMPONENTS
2-
COMP input.f90 /^ TYPE (COMPO/;" v module:MDCOMPONENTS
2+
COMP input.f90 /^ TYPE (COMPONENT), POINTER :: COMP$/;" v module:MDCOMPONENTS
33
COMPONENT input.f90 /^ TYPE COMPONENT$/;" t module:MDCOMPONENTS
4-
COMPONENTS input.f90 /^ TYPE (COMPONENT_POINTER), DIMENSION(LIM_COMPONENTS)/;" v module:MDCOMPONENTS
4+
COMPONENTS input.f90 /^ TYPE (COMPONENT_POINTER), DIMENSION(LIM_COMPONENTS) :: COMPONENTS, COMPONENTS_/;" v module:MDCOMPONENTS
55
COMPONENTS_TMP input.f90 /^ TYPE (COMPONENT_POINTER), DIMENSION(LIM_COMPONENTS) :: COMPONENTS, COMPONENTS_TMP$/;" v module:MDCOMPONENTS
66
COMPONENT_POINTER input.f90 /^ TYPE COMPONENT_POINTER /;" t module:MDCOMPONENTS
77
COMP_TMP input.f90 /^ TYPE (COMPONENT_POINTER) :: COMP_TMP$/;" v module:MDCOMPONENTS
@@ -12,5 +12,5 @@ NAME input.f90 /^ CHARACTER (LEN=30) :: NAME$/;" k type:COMPONENT
1212
NCOMP input.f90 /^ INTEGER (INT4) :: NUM_COMPONENTS = 0, NCOMP;/;" v module:MDCOMPONENTS
1313
NUM_COMPONENTS input.f90 /^ INTEGER (INT4) :: NUM_COMPONENTS /;" v module:MDCOMPONENTS
1414
NUM_PART input.f90 /^ INTEGER (INT4) :: NUM_PART$/;" k type:COMPONENT
15-
P input.f90 /^ TYPE/;" k type:COMPONENT_POINTER
15+
P input.f90 /^ TYPE (COMPONENT), POINTER :: P$/;" k type:COMPONENT_POINTER
1616
PART_LIST input.f90 /^ REAL (REAL8), DIMENSION(:), POINTER :: PART_LIST$/;" k type:COMPONENT
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
a input.f90 /^integer :: a,/;" v program:test
2-
b input.f90 /^ b,/;" v program:test
3-
c input.f90 /^ c,/;" v program:test
4-
d input.f90 /^ d /;" v program:test
1+
a input.f90 /^integer :: a, & !comment on variable a$/;" v program:test
2+
b input.f90 /^ b, & !comment on variable b$/;" v program:test
3+
c input.f90 /^ c, & !comment on variable c$/;" v program:test
4+
d input.f90 /^ d !comment on variable d$/;" v program:test
55
test input.f90 /^program test$/;" p

Units/parser-fortran.r/byte.f.d/expected.tags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
A input.f /^ BYTE A,/;" v program:byte_test
22
A1 input.f /^ BYTE A1,/;" v program:byte_test
33
A2 input.f /^ BYTE A2 /;" v program:byte_test
4-
B input.f /^ BY/;" v program:byte_test
4+
B input.f /^ BYTE A, B,/;" v program:byte_test
55
B1 input.f /^ BYTE A1, B1,/;" v program:byte_test
66
B2 input.f /^ BYTE A2 \/'x'\/, B2 /;" v program:byte_test
77
C input.f /^ BYTE A, B, C /;" v program:byte_test
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
para_a input.f90 /^para_a,/;" v module:test
2-
para_b input.f90 /^para_b,/;" v module:test
3-
para_c input.f90 /^para_c /;" v module:test
1+
para_a input.f90 /^para_a, & ! para_a /;" v module:test
2+
para_b input.f90 /^para_b, & ! para_b /;" v module:test
3+
para_c input.f90 /^para_c ! para_c /;" v module:test
44
test input.f90 /^module test$/;" m

0 commit comments

Comments
 (0)