diff options
author | Alejandro Colomar <alx@kernel.org> | 2023-01-08 00:10:39 +0100 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2023-01-08 00:10:42 +0100 |
commit | 3cc1d3885007238256e70c100eec938fd94b7ee3 (patch) | |
tree | 0578622654c36da3ba1d600be09b9faeb18cb459 | |
parent | f805aa763fad3156428866a02de95ba9b67079a7 (diff) |
Support parenthesized function names
This creates some false positives, but with appropriate flags, those can
be removed.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rwxr-xr-x | bin/grepc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -206,7 +206,7 @@ grepc_func_proto() grepc_helper \ "\b$1\s*\(" \ '.' \ - '(?s)^[\w[]([\w\s\(,\)[\]*]|::)+[\w\s\)*\]]\s+\**'"$1"'\s*\(([\w\s\(,\)[\]*]|::)+?(\.\.\.)?\)([\w\s\(,\)[\]]|::)*;'; + '(?s)^[\w[]([\w\s\(,\)[\]*]|::)+[\w\s\)*\]]\s+\**\(?'"$1"'\)?\s*\(([\w\s\(,\)[\]*]|::)+?(\.\.\.)?\)([\w\s\(,\)[\]]|::)*;'; } @@ -215,7 +215,7 @@ grepc_func_def() grepc_helper \ "\b$1\s*\(" \ '.' \ - '(?s)^[\w[]([\w\s\(,\)[\]*]|::)*[\w\s\)*\]]\s+\**'"$1"'\s*\(([\w\s\(,\)[\]*]|::)+?(\.\.\.)?\)[ \t]*\n([ \t]*){.*?^\4}'; + '(?s)^[\w[]([\w\s\(,\)[\]*]|::)*[\w\s\)*\]]\s+\**\(?'"$1"'\)?\s*\(([\w\s\(,\)[\]*]|::)+?(\.\.\.)?\)[ \t]*\n([ \t]*){.*?^\4}'; } |