Skip to content

Commit 08d9480

Browse files
committed
[libc][docs] Generate docs for signal.h & optimized docgen.py's is_implemented func. (#87835)
1 parent 185d820 commit 08d9480

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

libc/utils/docgen/docgen.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@ def is_implemented(hname: str, fname: str) -> bool:
2929
hname.rstrip(".h")
3030
)
3131
source_file_name = fname + ".cpp"
32-
if path.joinpath(source_file_name).exists():
33-
return True
34-
35-
# Attempt to search in the subfolders with 1-depth.
36-
for sub_dir in path.iterdir():
37-
if (sub_dir.joinpath(source_file_name)).exists():
32+
# Recursively search for the target source file in the subdirectories under
33+
# libc/src/{hname}.
34+
for sub_dir in path.glob("**"):
35+
if sub_dir.joinpath(source_file_name).exists():
3836
return True
3937

4038
return False

0 commit comments

Comments
 (0)