From a41f43a1ab652ec0629a63d0812a30bfec0e0faf Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 17 Nov 2025 07:50:28 +0100 Subject: pkg/clangtool: make more generic Make it possible to use pkg/clangtool with other types than declextract.Output. --- pkg/declextract/fileops.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/declextract/fileops.go') diff --git a/pkg/declextract/fileops.go b/pkg/declextract/fileops.go index 8b2ea629a..8af85189f 100644 --- a/pkg/declextract/fileops.go +++ b/pkg/declextract/fileops.go @@ -9,6 +9,7 @@ import ( "strings" "github.com/google/syzkaller/pkg/ast" + "github.com/google/syzkaller/pkg/clangtool" ) const ( @@ -243,7 +244,7 @@ func (ctx *context) mapFileToFops(funcs map[*Function]bool, funcToFops map[*Func best = append(best, fops) } } - best = sortAndDedupSlice(best) + best = clangtool.SortAndDedupSlice(best) // Now, filter out some excessive file_operations. // An example of an excessive case is if we have 2 file_operations with just read+write, // currently we emit generic read/write operations, so we would emit completly equal -- cgit mrf-deployment