diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-12-26 22:06:07 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-12-26 22:06:07 +0100 |
| commit | e747ec987b53b3b5ff8886c871f2c33a2a8e5631 (patch) | |
| tree | 6cf58c08aa3a549de33e810f2537c9cf05b01442 /pkg/csource | |
| parent | 82c9e6774f52bf4e299c7d5a5dff7530e104715a (diff) | |
pkg/csource: fix PRINTF removal
PRINTF now accepts arguments.
Diffstat (limited to 'pkg/csource')
| -rw-r--r-- | pkg/csource/csource.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go index decb0813c..6b86d98d7 100644 --- a/pkg/csource/csource.go +++ b/pkg/csource/csource.go @@ -405,8 +405,8 @@ func (ctx *context) postProcess(result []byte) []byte { result = regexp.MustCompile(`\t*NONFAILING\((.*)\);\n`).ReplaceAll(result, []byte("$1;\n")) } result = bytes.Replace(result, []byte("NORETURN"), nil, -1) - result = bytes.Replace(result, []byte("PRINTF"), nil, -1) result = bytes.Replace(result, []byte("doexit("), []byte("exit("), -1) + result = regexp.MustCompile(`PRINTF\(.*?\)`).ReplaceAll(result, nil) result = regexp.MustCompile(`\t*debug\((.*\n)*?.*\);\n`).ReplaceAll(result, nil) result = regexp.MustCompile(`\t*debug_dump_data\((.*\n)*?.*\);\n`).ReplaceAll(result, nil) result = regexp.MustCompile(`\t*exitf\((.*\n)*?.*\);\n`).ReplaceAll(result, []byte("\texit(1);\n")) |
