Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions clang/lib/AST/TypePrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))";
Expand Down
11 changes: 11 additions & 0 deletions clang/test/AST/ast-dump-type-callingconv.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// RUN: %clang_cc1 -triple aarch64 -ast-dump -ast-dump-filter foo %s \
// RUN: | FileCheck --strict-whitespace %s

// CHECK: {{foo1 'void \(\) __attribute__\(\(device_kernel\)\)'$}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// CHECK: {{foo1 'void \(\) __attribute__\(\(device_kernel\)\)'$}}
// CHECK: foo1 'void () __attribute__((device_kernel))'{{$}}

You don't need to apply the regex to the whole match, this makes it a little bit easier to read.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applied this change and added a release note, thanks so much!

void foo1() __attribute__((device_kernel));

// CHECK: {{foo2 'void \(\) __attribute__\(\(aarch64_vector_pcs\)\)'$}}
void foo2() __attribute__((aarch64_vector_pcs));

// CHECK: {{foo3 'void \(\) __attribute__\(\(aarch64_sve_pcs\)\)'$}}
void foo3() __attribute__((aarch64_sve_pcs));