Module Name: src Committed By: rillig Date: Wed Feb 22 23:55:05 UTC 2023
Modified Files: src/usr.bin/xlint/lint1: README.md Log Message: lint: document limitations To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.bin/xlint/lint1/README.md 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/README.md diff -u src/usr.bin/xlint/lint1/README.md:1.11 src/usr.bin/xlint/lint1/README.md:1.12 --- src/usr.bin/xlint/lint1/README.md:1.11 Sun Feb 5 13:06:36 2023 +++ src/usr.bin/xlint/lint1/README.md Wed Feb 22 23:55:05 2023 @@ -1,4 +1,4 @@ -[//]: # ($NetBSD: README.md,v 1.11 2023/02/05 13:06:36 rillig Exp $) +[//]: # ($NetBSD: README.md,v 1.12 2023/02/22 23:55:05 rillig Exp $) # Introduction @@ -64,6 +64,19 @@ or just informational depends on several * The option `-q` enables additional queries that are not suitable as regular warnings but may be interesting to look at on a case-by-case basis. +# Limitations + +Lint operates on the level of individual expressions. + +* It does not build an AST of the statements of a function, therefore it + cannot reliably analyze the control flow in a single function. +* It does not store the control flow properties of functions, therefore it + cannot relate argument nullability with the return value. +* It does not have information about functions, except for their prototypes, + therefore it cannot relate them across translation units. +* It does not store detailed information about complex data types, therefore + it cannot cross-check them across translation units. + # Fundamental types Lint mainly analyzes expressions (`tnode_t`), which are formed from operators