aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ast
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2025-01-17 10:39:47 +0100
committerDmitry Vyukov <dvyukov@google.com>2025-01-17 18:09:32 +0000
commitf2cb035c8f931efff4a020b164e657f16f51934b (patch)
tree967cd39fb98171cba878893a41ca461ffa993c8c /pkg/ast
parent38ee454540b9b41d5cc173871dfbf7dd140e8abc (diff)
pkg/declextract: remove unused includes and defines
This is nice on its own, but this will also help to prevent lots of problems when we export more info from the clang tool in future. The clang tool does not know what will end up in the final descriptions, so it exports info about all consts that it encounters. As the result we pull in lots of includes/defines, and lots of kernel includes/defines are broken or create problems. So the fewer we have, the better.
Diffstat (limited to 'pkg/ast')
-rw-r--r--pkg/ast/ast.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/ast/ast.go b/pkg/ast/ast.go
index bd2d97c23..7c1db28ea 100644
--- a/pkg/ast/ast.go
+++ b/pkg/ast/ast.go
@@ -71,7 +71,7 @@ type Include struct {
}
func (n *Include) Info() (Pos, string, string) {
- return n.Pos, tok2str[tokInclude], ""
+ return n.Pos, tok2str[tokInclude], n.File.Value
}
type Incdir struct {