mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
proto: make proto doesn't handle bool type correctly
closes: #19436 Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
9ebb666b8c
commit
823f4f12b8
@@ -441,6 +441,9 @@ def generate_prototypes(tu, src_path: Path) -> List[str]:
|
||||
print(f"[def] {fn.spelling}", file=sys.stderr)
|
||||
toks = tokens_for_function_header(fn)
|
||||
header = join_tokens(toks) if toks else header_from_cursor(fn)
|
||||
# libclang expands the bool macro (from <stdbool.h>) to _Bool.
|
||||
# Restore it to bool for readability.
|
||||
header = re.sub(r'\b_Bool\b', 'bool', header)
|
||||
if header:
|
||||
protos.append(f"{header};")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user