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