xref: /netbsd-src/tests/usr.bin/indent/opt_ta.c (revision 62d29170f158c303b27a40ac4e340f13eb01abd5)
1 /* $NetBSD: opt_ta.c,v 1.6 2023/05/15 20:50:37 rillig Exp $ */
2 
3 /*
4  * Tests for the option '-ta', which assumes that all identifiers that end in
5  * '_t' are type names.  This mainly affects declarations and expressions
6  * containing type casts.
7  */
8 
9 //indent input
10 void
example(void * arg)11 example(void *arg)
12 {
13 	int		mult = (unknown_type_name)   *   arg;
14 
15 	int		cast = (unknown_type_name_t)   *   arg;
16 }
17 //indent end
18 
19 //indent run -ta
20 void
example(void * arg)21 example(void *arg)
22 {
23 	int		mult = (unknown_type_name) * arg;
24 
25 	int		cast = (unknown_type_name_t)*arg;
26 }
27 //indent end
28