Skip to content

Commit 064ef8a

Browse files
authored
Merge pull request #10907 from tvegas1/ctags_profile_always
BUILD: Add tags for profile macros with _ALWAYS suffix
2 parents 02fdb8f + f56c010 commit 064ef8a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

buildlib/tools/test_ctags.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ for tag in \
2323
ucp_tag_send_nbx \
2424
ucs_error \
2525
ucp_request_free \
26-
test_ucp_am;
26+
test_ucp_am \
27+
uct_iface_mp_chunk_alloc;
2728
do
2829
echo checking tag=$tag
2930
vim -u NONE -c "set tags=./tags" -c "tag $tag" -c 'if v:errmsg != "" | cquit | else | quit | endif'

contrib/ctags_ucx.awk

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,25 @@ function fail(line) {
1717
print line | "cat >&2"
1818
}
1919

20-
/UCS_PROFILE_FUNC_VOID[\t ]*\(/ {
21-
match($0, /UCS_PROFILE_FUNC_VOID\([\t ]*([^, \t]+)/, name)
20+
/UCS_PROFILE_FUNC_VOID[_A-Z]*[\t ]*\(/ {
21+
match($0, /UCS_PROFILE_FUNC_VOID[_A-Z]*\([\t ]*([^, \t]+)/, name)
2222
if (name[1] == "") {
2323
fail($0)
2424
next
2525
}
2626

2727
emit("void", name[1]);
28+
next
2829
}
2930

30-
/UCS_PROFILE_FUNC[\t ]*\(/ {
31-
match($0, /UCS_PROFILE_FUNC\([\t ]*([^, \t]+)/, type)
32-
match($0, /UCS_PROFILE_FUNC\([^,]+,[\t ]*([^, \t]+)/, name)
31+
/UCS_PROFILE_FUNC[_A-Z]*[\t ]*\(/ {
32+
match($0, /UCS_PROFILE_FUNC[_A-Z]*\([\t ]*([^, \t]+)/, type)
33+
match($0, /UCS_PROFILE_FUNC[_A-Z]*\([^,]+,[\t ]*([^, \t]+)/, name)
3334
if (type[1] == "" || name[1] == "") {
3435
fail($0)
3536
next
3637
}
3738

3839
emit(type[1], name[1]);
40+
next
3941
}

0 commit comments

Comments
 (0)