diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2025-11-17 11:03:15 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2025-11-20 10:10:05 +0000 |
| commit | 94d1e3f8b1838e8a04074464a957e979a5c5e36b (patch) | |
| tree | 77a8c97b2dce7bb0dd1704d31eccc1b9c647a3ad /pkg/declextract | |
| parent | 2cc4c24ac3c9f96891da39b75cc806a6696b3a12 (diff) | |
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.
Diffstat (limited to 'pkg/declextract')
| -rw-r--r-- | pkg/declextract/entity.go | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
