Skip to content

Commit

Permalink
sys/syz-extract: support more identifier quoting options
Browse files Browse the repository at this point in the history
That's insanity compilers shuffle them in all possible combinations.
  • Loading branch information
dvyukov committed Mar 14, 2019
1 parent 38ebd40 commit d72db19
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sys/syz-extract/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d72db19

Please sign in to comment.