Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: document limitations
details: https://anonhg.NetBSD.org/src/rev/8860da1e7584
branches: trunk
changeset: 373646:8860da1e7584
user: rillig <rillig%NetBSD.org@localhost>
date: Wed Feb 22 23:55:05 2023 +0000
description:
lint: document limitations
diffstat:
usr.bin/xlint/lint1/README.md | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r f08f071e3f5a -r 8860da1e7584 usr.bin/xlint/lint1/README.md
--- a/usr.bin/xlint/lint1/README.md Wed Feb 22 22:30:40 2023 +0000
+++ b/usr.bin/xlint/lint1/README.md Wed Feb 22 23:55:05 2023 +0000
@@ -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 @@
* 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
Home |
Main Index |
Thread Index |
Old Index