[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)
Tomas Matheson via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 28 09:31:03 PDT 2024
================
@@ -102,8 +102,9 @@ int __attribute__((target_version("sha2"))) combine(void) { return 1; }
// expected-error at +1 {{multiversioned function declaration has a different calling convention}}
int __attribute__((aarch64_vector_pcs, target_version("sha3"))) combine(void) { return 2; }
-int __attribute__((target_version("fp+aes+pmull+rcpc"))) unspec_args() { return -1; }
+int unspec_args();
// expected-error at -1 {{multiversioned function must have a prototype}}
-// expected-error at +1 {{multiversioned function must have a prototype}}
+// expected-note at +1 {{function multiversioning caused by this declaration}}
+int __attribute__((target_version("fp"))) unspec_args() { return -1; }
int __attribute__((target_version("default"))) unspec_args() { return 0; }
----------------
tmatheson-arm wrote:
Can we keep the test to check that we _don't_ emit a diagnostic then?
https://github.com/llvm/llvm-project/pull/96628
More information about the cfe-commits
mailing list