================ @@ -0,0 +1,24 @@ +// Verify there is a space after the parens when priting callingconv attributes. +// RUN: %clang_cc1 -DDEVICE -triple spirv64 -ast-dump -ast-dump-filter foo %s \ +// RUN: | FileCheck -check-prefix=CHECK-DEVICE --strict-whitespace %s + +// RUN: %clang_cc1 -DVECTOR -triple aarch64 -ast-dump -ast-dump-filter foo %s \ +// RUN: | FileCheck -check-prefix=CHECK-VECTOR --strict-whitespace %s + +// RUN: %clang_cc1 -DSVE -triple aarch64 -ast-dump -ast-dump-filter foo %s \ +// RUN: | FileCheck -check-prefix=CHECK-SVE --strict-whitespace %s + +#ifdef DEVICE +// CHECK-DEVICE-NOT: ()__attribute__((device_kernel)) +void foo() __attribute__((device_kernel)); +#endif + +#ifdef VECTOR +// CHECK-VECTOR-NOT: ()__attribute__((aarch64_vector_pcs)) +void foo() __attribute__((aarch64_vector_pcs)); +#endif + +#ifdef SVE +// CHECK-SVE-NOT: ()__attribute__((aarch64_sve_pcs)) +void foo() __attribute__((aarch64_sve_pcs)); +#endif ---------------- sarnex wrote:
Thanks for the review. I did the negative check because before this change the AST print is a little different for some reason where it contains the good string as part of the overall string, ex: ``` foo3 'void () __attribute__((aarch64_sve_pcs))':'void ()__attribute__((aarch64_sve_pcs))' ``` and after the fix the output is only ``` foo3 'void () __attribute__((aarch64_sve_pcs))' ``` so checking for `foo3 'void () __attribute__((aarch64_sve_pcs))'` doesn't work because it's a substring in the bad case. but I managed to fix it by using regex and checking for EOL, it's not super pretty though, just pushed it, thanks. 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