xref: /netbsd-src/tests/usr.bin/xlint/lint2/read.ln (revision d536862b7d93d77932ef5de7eebdc48d76921b77)
1# $NetBSD: read.ln,v 1.5 2021/08/30 21:23:37 rillig Exp $
2#
3# Cover each path of reading declarations, definitions and usages.
4
50 s read.c
6S read.c
7
8# Cover all tspec_t constants, in declaration order.
9#
10# The line numbers correspond to the constant values of tspec_t,
11# with the 128-bit types included.
12#
13# NOTSPEC	cannot occur in lint1 output.
14# SIGNED	cannot occur in lint1 output.
15# UNSIGN	cannot occur in lint1 output.
16103 d 0.103 e 4f103 F0 B	# BOOL		_Bool		f103(void);
17104 d 0.104 e 4f104 F0 C	# CHAR		char		f104(void);
18105 d 0.105 e 4f105 F0 sC	# SCHAR		signed char	f105(void);
19106 d 0.106 e 4f106 F0 uC	# UCHAR		unsigned char	f106(void);
20107 d 0.107 e 4f107 F0 S	# SHORT		short		f107(void);
21108 d 0.108 e 4f108 F0 uS	# USHORT	unsigned short	f108(void);
22109 d 0.109 e 4f109 F0 I	# INT		int		f109(void);
23110 d 0.110 e 4f110 F0 uI	# UINT		unsigned int	f110(void);
24111 d 0.111 e 4f111 F0 L	# LONG		long		f111(void);
25112 d 0.112 e 4f112 F0 uL	# ULONG		unsigned long	f112(void);
26113 d 0.113 e 4f113 F0 Q	# QUAD		long long	f113(void);
27114 d 0.114 e 4f114 F0 uQ	# UQUAD		unsigned long long f114(void);
28# INT128	works only in 64-bit mode, see read_lp64.
29# UINT128	works only in 64-bit mode, see read_lp64.
30117 d 0.117 e 4f117 F0 sD	# FLOAT		float		f117(void);
31118 d 0.118 e 4f118 F0 D	# DOUBLE	double		f118(void);
32119 d 0.119 e 4f119 F0 lD	# LDOUBLE	long double	f119(void);
33120 d 0.120 e 4f120 F0 V	# VOID		void		f120(void);
34121 d 0.121 e 4f121 F0 sT16tag121 # STRUCT	struct tag121	f121(void);
35122 d 0.122 e 4f122 F0 uT16tag122 # UNION	union tag122	f122(void);
36123 d 0.123 e 4f123 F0 eT16tag123 # ENUM	enum tag123	f123(void);
37124 d 0.124 e 4f124 F0 PV	# PTR		void *		f124(void);
38125 d 0.125 e 4a125 A7D		# ARRAY		extern double	a125[7];
39126 d 0.126 e 4f126 F0 PF1DV	# FUNC		void (*f126(void))(double);
40# COMPLEX	cannot occur in lint1 output.
41127 d 0.127 e 4f127 F0 sX	# FCOMPLEX	float _Complex	f127(void);
42128 d 0.128 e 4f128 F0 X	# COMPLEX	double _Complex	f128(void);
43129 d 0.129 e 4f129 F0 lX	# LCOMPLEX	long double _Complex f129(void);
44
45# Tagged types (struct, union, enum) can have tags or typedefs or be
46# anonymous, but anonymous types are not usually used in external
47# declarations.
48#
49# struct s_tag f201(void);
50201 d 0.201 e 4f201 F0 sT15s_tag
51# typedef struct {} s_def;
52# s_def f202(void);
53202 d 0.202 e 4f202 F0 sT25s_def
54# struct { int member; } f203(void);
55203 d 0.203 e 4f203 F0 sT3203.0.0
56
57# Type qualifiers
58#
59# void f301(const int *);
60301 d 0.301 e 4f301 F1 PcI V
61# void f302(volatile int *);
62302 d 0.302 e 4f302 F1 PvI V
63# void f302(const volatile int *);
64303 d 0.303 e 4f303 F1 PcvI V
65
66# Taken from ../lint1/emit.exp-ln.
67193 d 0.193 v0 d 15varargs_comment   F1 PcC V
68199 d 0.199 v0 d 17varargs_0_comment F1 PcC V
69205 d 0.205 v3 d 17varargs_3_comment F4 I I I PcC V
70# The PRINTFLIKE information is only emitted if its argument is > 0.
71211 d 0.211         d 18printflike_comment    F1  PcC V
72217 d 0.217         d 20printflike_0_comment  F1  PcC V
73223 d 0.223 v3  P3  d 20printflike_3_comment  F3  I I PcC V
74229 d 0.229 v10 P10 d 21printflike_10_comment F10 I I I I I I I I I PcC V
75# The SCANFLIKE information is only emitted if its argument is > 0.
76237 d 0.237         d 17scanflike_comment     F1  PcC V
77243 d 0.243         d 19scanflike_0_comment   F1  PcC V
78249 d 0.249 v3  S3  d 19scanflike_3_comment   F3  I I PcC V
79#
80253 d 0.253 e   13used_function F0 V
81258 c 0.258 i   13used_function f0 V
82# In a function definition, 'i' means 'inline'.
83256 d 0.256 d i 15inline_function F0 V
84
85# In a function definition, 'r' means the function returns a value, in
86# contrast to having a mere 'return;' without any expression.
87# This distinction is mainly relevant for non-prototype functions.
88254 d 0.254 d r   13used_function F0 I
89# In a function call, 'i' means 'return value ignored'.
90262 c 0.262 i     13used_function f0 I
91# In a function call, 'd' means 'return value discarded'.
92263 c 0.263 d     13used_function f0 I
93# In a function call, 'u' means 'return value used'.
94264 c 0.264 u     13used_function f0 I
95# This function is 'inline' and 'has return value'.
96260 d 0.260 d r i 15inline_function F0 I
97