]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
proto: make proto doesn't handle bool type correctly
authorHirohito Higashi <h.east.727@gmail.com>
Mon, 16 Feb 2026 22:20:50 +0000 (22:20 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 16 Feb 2026 22:20:50 +0000 (22:20 +0000)
closes: #19436

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/proto/gen_prototypes.py

index c11652bb15e28f2250315b4fa1626c4d976b4410..0458b4f88aa75b2a35773df2e15cae31707d56a6 100644 (file)
@@ -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};")