llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Nick Sarnie (sarnex) <details> <summary>Changes</summary> There needs to be a space as the first character, otherwise the printed function prototype will have the CC attribute attached to the final `)`. I noticed this looking at the AST for a function with `__attribute__((device_kernel))` --- Full diff: https://github.com/llvm/llvm-project/pull/143160.diff 1 Files Affected: - (modified) clang/lib/AST/TypePrinter.cpp (+3-3) ``````````diff 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))"; `````````` </details> https://github.com/llvm/llvm-project/pull/143160 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits