From 94d1e3f8b1838e8a04074464a957e979a5c5e36b Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 17 Nov 2025 11:03:15 +0100 Subject: pkg/clangtool: allow final verification of output Let tools verify that all source file names, line numbers, etc are valid/present. If there are any bogus entries, it's better to detect them early, than to crash/error much later when the info is used. --- pkg/declextract/entity.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/declextract') diff --git a/pkg/declextract/entity.go b/pkg/declextract/entity.go index bd8f143d1..3b5e13a6d 100644 --- a/pkg/declextract/entity.go +++ b/pkg/declextract/entity.go @@ -241,7 +241,7 @@ func (out *Output) Merge(other *Output) { out.NetlinkPolicies = append(out.NetlinkPolicies, other.NetlinkPolicies...) } -func (out *Output) SortAndDedup() { +func (out *Output) Finalize(v *clangtool.Verifier) { out.Functions = clangtool.SortAndDedupSlice(out.Functions) out.Consts = clangtool.SortAndDedupSlice(out.Consts) out.Enums = clangtool.SortAndDedupSlice(out.Enums) -- cgit mrf-deployment