From d72db19b2a8ebb5aedf5a7c4950fc282a1042670 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 14 Mar 2019 15:30:58 +0100 Subject: sys/syz-extract: support more identifier quoting options That's insanity compilers shuffle them in all possible combinations. --- sys/syz-extract/fetch.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/syz-extract/fetch.go b/sys/syz-extract/fetch.go index db37fe4ab..a3c49c9b5 100644 --- a/sys/syz-extract/fetch.go +++ b/sys/syz-extract/fetch.go @@ -36,10 +36,9 @@ func extract(info *compiler.ConstInfo, cc string, args []string, addSource strin valMap[val] = true } for _, errMsg := range []string{ - "error: ‘([a-zA-Z0-9_]+)’ undeclared", - "error: '([a-zA-Z0-9_]+)' undeclared", - "note: in expansion of macro ‘([a-zA-Z0-9_]+)’", - "error: use of undeclared identifier '([a-zA-Z0-9_]+)'", + `error: [‘']([a-zA-Z0-9_]+)[’'] undeclared`, + `note: in expansion of macro [‘']([a-zA-Z0-9_]+)[’']`, + `error: use of undeclared identifier [‘']([a-zA-Z0-9_]+)[’']`, } { re := regexp.MustCompile(errMsg) matches := re.FindAllSubmatch(out, -1) -- cgit mrf-deployment