Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: fix unintended line br...



details:   https://anonhg.NetBSD.org/src/rev/0bca3f99d1c8
branches:  trunk
changeset: 1022582:0bca3f99d1c8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jul 25 19:22:08 2021 +0000

description:
tests/lint: fix unintended line breaks

diffstat:

 tests/usr.bin/xlint/lint1/parse_type_name.c   |  48 ++++++--------------------
 tests/usr.bin/xlint/lint1/parse_type_name.exp |   8 ++--
 2 files changed, 16 insertions(+), 40 deletions(-)

diffs (107 lines):

diff -r 878e2ad57e9e -r 0bca3f99d1c8 tests/usr.bin/xlint/lint1/parse_type_name.c
--- a/tests/usr.bin/xlint/lint1/parse_type_name.c       Sun Jul 25 19:05:27 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/parse_type_name.c       Sun Jul 25 19:22:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse_type_name.c,v 1.4 2021/07/25 15:48:58 rillig Exp $       */
+/*     $NetBSD: parse_type_name.c,v 1.5 2021/07/25 19:22:08 rillig Exp $       */
 # 3 "parse_type_name.c"
 
 /*
@@ -80,29 +80,17 @@
 
        /* cover 'abstract_decl_param_list asm_or_symbolrename_opt' */
        sink(sizeof(int(double)));
-       sink(sizeof(
-       int(
-       double) __asm("anything")));
-       sink(sizeof(
-       int(
-       double) __symbolrename(alias)));
+       sink(sizeof(int(double) __asm("anything")));
+       sink(sizeof(int(double) __symbolrename(alias)));
 
        /* cover 'direct_abstract_declarator abstract_decl_param_list asm_or_symbolrename_opt' */
        sink(sizeof(int (*)(double)));
-       sink(sizeof(
-       int(*)(double) __asm("anything")));
-       sink(sizeof(
-       int(*)
-       (double)__symbolrename(alias)));
+       sink(sizeof(int (*)(double) __asm("anything")));
+       sink(sizeof(int (*)(double)__symbolrename(alias)));
 
        /* cover 'direct_abstract_declarator type_attribute_list' */
-       sink(sizeof(
-       int(*)
-           __attribute__(())));
-       sink(sizeof(
-       int(*)
-           __attribute__(())
-           __attribute__(())));
+       sink(sizeof(int (*) __attribute__(())));
+       sink(sizeof(int (*) __attribute__(()) __attribute__(())));
 }
 
 void
@@ -110,32 +98,21 @@
 {
        /* cover 'abstract_decl_lparen T_RPAREN type_attribute_opt' */
        sink(sizeof(void (*)()));
-       sink(sizeof(
-       void (*)
-       ()
-           __attribute__(())));
+       sink(sizeof(void (*)() __attribute__(())));
        /*
         * XXX: The grammar allows only a single type_attribute_opt.
         * Where does the second type_attribute go?
         */
        sink(sizeof(
-       void (*)
-       ()
-           __attribute__(())
-           __attribute__(())));
+       void (*)() __attribute__(()) __attribute__(())));
 
        /* cover 'abstract_decl_lparen vararg_parameter_type_list T_RPAREN type_attribute_opt' */
-       sink(sizeof(
-       void (*)
-       (void)__attribute__(())));
+       sink(sizeof(void (*)(void) __attribute__(())));
        /*
         * XXX: The grammar allows only a single type_attribute_opt.
         * Where does the second type_attribute go?
         */
-       sink(sizeof(
-       void (*)
-       (void)__attribute__(())
-           __attribute__(())));
+       sink(sizeof(void (*)(void) __attribute__(()) __attribute__(())));
 
        /* cover 'abstract_decl_lparen error T_RPAREN type_attribute_opt' */
        /* expect+1: syntax error 'goto' [249] */
@@ -193,8 +170,7 @@
 
        /* cover 'begin_type_declmods end_type abstract_declarator' */
        /* GCC 11 warns: type defaults to 'int' in type name */
-       sink(sizeof(
-       void (*)(int, const *)));
+       sink(sizeof(void (*)(int, const *)));
 
        /* cover 'begin_type_declaration_specifiers end_type abstract_declarator' */
        sink(sizeof(void (*)(int, double *)));
diff -r 878e2ad57e9e -r 0bca3f99d1c8 tests/usr.bin/xlint/lint1/parse_type_name.exp
--- a/tests/usr.bin/xlint/lint1/parse_type_name.exp     Sun Jul 25 19:05:27 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/parse_type_name.exp     Sun Jul 25 19:22:08 2021 +0000
@@ -1,7 +1,7 @@
 parse_type_name.c(52): error: cannot take size/alignment of function [144]
 parse_type_name.c(72): error: null dimension [17]
 parse_type_name.c(76): error: null dimension [17]
-parse_type_name.c(142): error: syntax error 'goto' [249]
-parse_type_name.c(144): error: syntax error 'goto' [249]
-parse_type_name.c(150): error: syntax error 'goto' [249]
-parse_type_name.c(164): warning: ANSI C requires formal parameter before '...' [84]
+parse_type_name.c(119): error: syntax error 'goto' [249]
+parse_type_name.c(121): error: syntax error 'goto' [249]
+parse_type_name.c(127): error: syntax error 'goto' [249]
+parse_type_name.c(141): warning: ANSI C requires formal parameter before '...' [84]



Home | Main Index | Thread Index | Old Index