Module Name: src Committed By: rillig Date: Tue Aug 10 06:31:16 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: ops.def Log Message: lint: document operator properties directly at the definition To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/xlint/lint1/ops.def Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/xlint/lint1/ops.def diff -u src/usr.bin/xlint/lint1/ops.def:1.20 src/usr.bin/xlint/lint1/ops.def:1.21 --- src/usr.bin/xlint/lint1/ops.def:1.20 Thu Apr 1 14:59:21 2021 +++ src/usr.bin/xlint/lint1/ops.def Tue Aug 10 06:31:16 2021 @@ -1,9 +1,31 @@ -/* $NetBSD: ops.def,v 1.20 2021/04/01 14:59:21 rillig Exp $ */ +/* $NetBSD: ops.def,v 1.21 2021/08/10 06:31:16 rillig Exp $ */ begin_ops() -/* See mod_t in op.h for the definition of the table columns. */ - +/* + * Operator properties; see mod_t in op.h. + * + * warn if operand '=' x + * bad on enum x + * valid on enum x + * comparison - - - - - - - - - - - - - - - - x + * possible precedence confusion x | + * warn if right operand unsigned x | + * warn if left operand unsigned x | + * has side effects - - - - - - - - - - - - x | + * balance operands x | | + * left test context x | | + * left value context x | | + * fold constant operands - - - - - - - - x | | + * requires scalar x | | | + * requires arithmetic x | | | + * requires integer or complex x | | | + * requires integer - - - - x | | | + * requires _Bool x | | | | + * takes _Bool x | | | | + * logical x | | | | + * binary x | | | | + */ /* name repr b l b B i c a s f v t b s l r p c e e = */ op( NOOP, "no-op", -,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-) op( ARROW, "->", 1,-,1,-,-,-,-,-,-,1,-,-,-,-,-,-,-,-,-,-)