Skip to content

Commit b5f6778

Browse files
authored
Merge pull request #1 from google/fix2
Fix function name regex.
2 parents 5b1e2ab + 2409f96 commit b5f6778

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

experiment/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def parse_function_name(function_signature: str) -> str:
3737
# Invalid matches:
3838
# 1. __attribute__((.*))
3939
# 2. __attribute__((alloc_size(1)))
40-
names = re.findall(r'.*?\s*([\w:<>+*~])\s*\([^\(]*\)', function_signature)
40+
names = re.findall(r'.*?\s*([\w:<>+*~]+)\s*\([^\(]*\)', function_signature)
4141
if names:
4242
# Normalize names.
4343
return re.sub(r'[^\w:]', '-', names[-1])

0 commit comments

Comments
 (0)