[clang] [clang][AST] Fix spaces TypePrinter for some calling convs (PR #143160)
Nick Sarnie via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 6 08:22:53 PDT 2025
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/143160
There needs to be a space as the first character, otherwise the printed function prototype will have the CC attribute attached to the final `)`.
>From 56f19d4f839d1c65a3f1145fcdcac5207ff61c11 Mon Sep 17 00:00:00 2001
From: "Sarnie, Nick" <nick.sarnie at intel.com>
Date: Fri, 6 Jun 2025 08:21:56 -0700
Subject: [PATCH] [clang][AST] Fix spaces TypePrinter for some calling convs
Signed-off-by: Sarnie, Nick <nick.sarnie at intel.com>
---
clang/lib/AST/TypePrinter.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/clang/lib/AST/TypePrinter.cpp b/clang/lib/AST/TypePrinter.cpp
index 330cfcd962825..d18723d807c6a 100644
--- a/clang/lib/AST/TypePrinter.cpp
+++ b/clang/lib/AST/TypePrinter.cpp
@@ -1095,13 +1095,13 @@ void TypePrinter::printFunctionAfter(const FunctionType::ExtInfo &Info,
OS << " __attribute__((pcs(\"aapcs-vfp\")))";
break;
case CC_AArch64VectorCall:
- OS << "__attribute__((aarch64_vector_pcs))";
+ OS << " __attribute__((aarch64_vector_pcs))";
break;
case CC_AArch64SVEPCS:
- OS << "__attribute__((aarch64_sve_pcs))";
+ OS << " __attribute__((aarch64_sve_pcs))";
break;
case CC_DeviceKernel:
- OS << "__attribute__((device_kernel))";
+ OS << " __attribute__((device_kernel))";
break;
case CC_IntelOclBicc:
OS << " __attribute__((intel_ocl_bicc))";
More information about the cfe-commits
mailing list