From 591a5f46836cf82ac29e22641a77425a22f9e7e4 Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Tue, 21 Mar 2023 02:25:52 -0700 Subject: [PATCH] fix: also capture templated decltype functions --- vr_address_tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/vr_address_tools.py b/vr_address_tools.py index 090b810..45be17b 100755 --- a/vr_address_tools.py +++ b/vr_address_tools.py @@ -60,6 +60,7 @@ REL_ID: OFFSET_RELID_PATTERN, REL_OFFSET: OFFSET_OFFSET_PATTERN, } +FUNCTION_REGEX = r"(?:class (?P\w+)[&\w\s;:<>{=[\]*]*?)?(?P[\w<>:*]+)\s+(?:\w+::)?(?P[\w]+)\s*\((?P[^)]*),?\s*\)[\w\s]*{(?:[\w\s=]*decltype\(&(?P\w+)::(?P=func_name)+(?:<.*>)?\))?[&\w\s;:<>{=*]*REL(?:[\w:]*ID)\((?:(?P\d*)|(?P\d*),\s*(?P\d*))\) };" GENERIC_FOO_REGEX = r"(?P[\w<>:*&]+)\s+(?:\w+::)?(?P[\w]+)\s*\((?P[^)]*)?\s*\)[\w\s]*{[&\w\s;:<>{=*/+-.]*_generic_foo<(?:(?P\d*)),\s+(?P=return_type)(?:,\s*)?(?:(?P\w+)\*)?.*>\(.*\);" ARGS_REGEX = r"(?P(?:const )?(?P[\w*&:_]+)\s+(?P[\w_]*)),?" FUNCTION_REGEX_PARSE_DICT = {