From ba25b32a0b180fd14ddd74eef6445839e8208871 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 23 Oct 2025 17:30:56 +0200 Subject: pkg/csource: remove include guards from reproducers Drop all lines matching `#define [A-Z0-9_]*_H` from the reproducers --- pkg/csource/csource.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/csource/csource.go') diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go index ecfca80ea..acbb33ff8 100644 --- a/pkg/csource/csource.go +++ b/pkg/csource/csource.go @@ -685,6 +685,9 @@ func (ctx *context) postProcess(result []byte) []byte { result = regexp.MustCompile(`\t*exitf\((.*\n)*?.*\);\n`).ReplaceAll(result, []byte("\texit(1);\n")) result = regexp.MustCompile(`\t*fail(msg)?\((.*\n)*?.*\);\n`).ReplaceAll(result, []byte("\texit(1);\n")) + // Remove executor include guards. + result = regexp.MustCompile(`#define\s+[A-Z0-9_]*_H\s*\n`).ReplaceAll(result, nil) + result = ctx.hoistIncludes(result) result = ctx.removeEmptyLines(result) return result -- cgit mrf-deployment