[libc-commits] [libc] [libc] Elide extra space in hdrgen function declarations (PR #127287)

Roland McGrath via libc-commits libc-commits at lists.llvm.org
Fri Feb 14 17:09:44 PST 2025


================
@@ -81,4 +81,7 @@ def collapse(type_string):
     def __str__(self):
         attrs_str = "".join(f"{attr} " for attr in self.attributes)
         arguments_str = ", ".join(self.arguments) if self.arguments else "void"
-        return attrs_str + f"{self.return_type} {self.name}({arguments_str})"
+        type_str = str(self.return_type)
+        if type_str[-1].isalnum() or type_str[-1] == "_":
----------------
frobtech wrote:

Done.

https://github.com/llvm/llvm-project/pull/127287


More information about the libc-commits mailing list