The NetBSD Project

CVS log for src/tests/usr.bin/xlint/lint1/queries.c

[BACK] Up to [cvs.NetBSD.org] / src / tests / usr.bin / xlint / lint1

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.24 / (download) - annotate - [select for diffs], Fri Feb 2 19:07:58 2024 UTC (4 weeks, 3 days ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.23: +6 -2 lines
Diff to previous 1.23 (colored)

tests/lint: test lexing of characters and strings

Revision 1.23 / (download) - annotate - [select for diffs], Sun Jan 28 08:54:27 2024 UTC (5 weeks, 1 day ago) by rillig
Branch: MAIN
Changes since 1.22: +2 -18 lines
Diff to previous 1.22 (colored)

tests/lint: enforce diagnostics to be listed in chronologic order

While here, fix the tests on uchar platforms.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Jan 20 10:02:31 2024 UTC (6 weeks, 2 days ago) by rillig
Branch: MAIN
Changes since 1.21: +24 -5 lines
Diff to previous 1.21 (colored)

lint: add query for const automatic variables

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jan 7 18:42:37 2024 UTC (8 weeks, 1 day ago) by rillig
Branch: MAIN
Changes since 1.20: +9 -4 lines
Diff to previous 1.20 (colored)

lint: allow querying for invisible characters in literals and constants

Revision 1.20 / (download) - annotate - [select for diffs], Sun Dec 10 15:29:38 2023 UTC (2 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.19: +13 -2 lines
Diff to previous 1.19 (colored)

lint: allow querying for 'static' followed by non-'static' declaration

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jul 3 15:29:42 2023 UTC (8 months ago) by rillig
Branch: MAIN
Changes since 1.18: +14 -8 lines
Diff to previous 1.18 (colored)

tests/lint: move platform-specific query tests to separate files

This fixes the tests on 'unsigned char' platforms.

Thanks martin@ for the notification.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jun 30 08:45:22 2023 UTC (8 months ago) by rillig
Branch: MAIN
Changes since 1.17: +20 -2 lines
Diff to previous 1.17 (colored)

lint: add query for assigning an integer 0 to a pointer

Revision 1.17 / (download) - annotate - [select for diffs], Sat Jun 24 08:11:12 2023 UTC (8 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.16: +22 -2 lines
Diff to previous 1.16 (colored)

lint: add query for comparing 'char' with plain integers

Revision 1.16 / (download) - annotate - [select for diffs], Sat Jun 24 06:55:34 2023 UTC (8 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.15: +9 -3 lines
Diff to previous 1.15 (colored)

lint: add query for redundant 'extern' in function declaration

Revision 1.15 / (download) - annotate - [select for diffs], Thu Jun 22 13:57:44 2023 UTC (8 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.14: +22 -4 lines
Diff to previous 1.14 (colored)

lint: add query for comma operator

Revision 1.14 / (download) - annotate - [select for diffs], Sat Jun 3 21:08:06 2023 UTC (9 months ago) by rillig
Branch: MAIN
Changes since 1.13: +14 -2 lines
Diff to previous 1.13 (colored)

lint: add query for static variables in functions

This query allows finding hidden global variables, as an easier-to-read
alternative to 'objdump -t'.

Revision 1.13 / (download) - annotate - [select for diffs], Sat May 13 20:55:44 2023 UTC (9 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.12: +16 -2 lines
Diff to previous 1.12 (colored)

lint: add query for chained assignments

Revision 1.12 / (download) - annotate - [select for diffs], Sat Apr 15 11:34:45 2023 UTC (10 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.11: +45 -2 lines
Diff to previous 1.11 (colored)

lint: add query for parenthesized return value

Revision 1.11 / (download) - annotate - [select for diffs], Fri Mar 31 13:03:05 2023 UTC (11 months ago) by rillig
Branch: MAIN
Changes since 1.10: +17 -2 lines
Diff to previous 1.10 (colored)

lint: allow querying for octal integer constants

Revision 1.10 / (download) - annotate - [select for diffs], Tue Mar 28 14:44:35 2023 UTC (11 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jan 15 14:00:09 2023 UTC (13 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.8: +7 -1 lines
Diff to previous 1.8 (colored)

tests/lint: document conversion from void pointer

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jan 8 18:37:12 2023 UTC (13 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.7: +12 -3 lines
Diff to previous 1.7 (colored)

lint: do not report usual arithmetic conversions for constants

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jan 8 18:21:00 2023 UTC (13 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.6: +15 -1 lines
Diff to previous 1.6 (colored)

lint/tests: test query for usual arithmetic conversions

Revision 1.6 / (download) - annotate - [select for diffs], Sat Sep 24 19:55:44 2022 UTC (17 months, 1 week ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

tests/lint: fix test for queries on platforms where char is unsigned

error: queries.c(118): missing /* expect+1: implicit conversion
    changes sign from 'char' to 'int' [Q3] */
error: queries.c(122): missing /* expect+1: implicit conversion
    changes sign from 'char' to 'int' [Q3] */

Revision 1.5 / (download) - annotate - [select for diffs], Sat Sep 10 13:13:22 2022 UTC (17 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

tests/lint: fix test for queries on platforms where char is unsigned

These platforms reported an additional "implicit conversion changes
sign" in lines 105, 105, 118, 122.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Aug 28 08:41:06 2022 UTC (18 months ago) by rillig
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

lint: rename dcs manipulation functions to be clearer

No functional change.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jul 8 21:19:07 2022 UTC (19 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.2: +59 -1 lines
Diff to previous 1.2 (colored)

lint: fix edge cases in the query for redundant cast before assignment

Casting from and to _Bool is only allowed outside strict bool mode.
Outside strict bool mode, _Bool is an integer type, therefore return
early if any of the operands has type _Bool.  In strict bool mode, even
casting from _Bool to _Bool is not allowed, as it is not needed in
practice.

Handle _Complex types before real floating-point types.  Return early
for _Complex types, as these are floating-point types as well.

For pointer casts, not only flag casts to or from 'pointer to void', but
also casts between the same types.

In debug mode, when constructing the type '_Complex float', the type
name of '_Complex' occurs in the debug log.  Outside of debug mode,
printing this type name is an error since this type keyword only occurs
internally, when constructing a type.  At that point, it is not supposed
to occur in any user-visible message.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jul 8 20:27:36 2022 UTC (19 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.1: +120 -11 lines
Diff to previous 1.1 (colored)

lint: fix query for redundant cast before assignment

Previously, 'i = (int)dbl' was marked as redundant, even though it
performs a value conversion.

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jul 5 22:50:41 2022 UTC (19 months, 4 weeks ago) by rillig
Branch: MAIN

lint: add additional queries that are not enabled by default

In the last 18 months, several lint warnings have been made adjusted to
allow common usage patterns.  For example, lint no longer warns about a
constant condition in the statement 'do { ... } while (false)' (message
161), as this pattern is well-known in statement-like macros, making it
unlikely that the 'false' is a mistake.  Another example is casts
between unequal pointer types (message 247) for a few well-known
patterns that are unlikely to be bugs.

Occasionally, it is useful to query the code for patterns or events that
would not justify a warning.  These patterns are modeled as predefined
queries that can be selected individually, in addition to and
independently of the existing warnings and errors.

New queries can be added as needed, in the same way as new warnings.
Queries that are deemed no longer used can be deactivated in the same
way as warnings that are no longer used.

As long as none of the queries is enabled, they produce a minimal
overhead of querying a single global variable.  Computations that are
more expensive than a few machine instructions should be guarded by
any_query_enabled.

https://mail-index.netbsd.org/source-changes-d/2022/06/28/msg013716.html

ok christos@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>