Skip to content

Commit 97aba91

Browse files
authored
[UR][Docs] Transform reference to macros in specs to links (#18285)
Contrary to the comment in the code macros do have API documentation, so they should be linked to. Currently there seems to be no macros in the rst sources, but I noticed this while working on an extension that would add one.
1 parent 53fced1 commit 97aba91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

unified-runtime/scripts/generate_docs.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def _find_enum_from_etor(etor, meta):
5858

5959
def _make_ref(symbol, symbol_type, meta):
6060
"""make restructedtext reference from symbol."""
61-
if not re.match(r"function|struct|union|enum|etor", symbol_type):
61+
if not re.match(r"function|struct|union|enum|etor|macro", symbol_type):
6262
return ""
6363

6464
ref = _fixup_tag(symbol)
@@ -180,7 +180,7 @@ def _generate_valid_rst(fin, fout, namespace, tags, ver, rev, meta, fast_mode):
180180
line = tuple[2]
181181
else:
182182
# ignore reference links for specific types that have no API documentation for them.
183-
if not re.match(r"env|handle|typedef|macro", symbol_type):
183+
if not re.match(r"env|handle|typedef", symbol_type):
184184
print(
185185
"%s(%s) : warning : reference link %s (type=%s) not used."
186186
% (fin, iline + 1, symbol, symbol_type)

0 commit comments

Comments
 (0)