[clang] [FMV] Allow multi versioning without default declaration. (PR #85454)

Jon Roelofs via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 22 09:55:07 PDT 2024


================
@@ -104,6 +103,7 @@ int __attribute__((target_version("sha2"))) combine(void) { return 1; }
 int __attribute__((aarch64_vector_pcs, target_version("sha3"))) combine(void) { return 2; }
 
 int __attribute__((target_version("fp+aes+pmull+rcpc"))) unspec_args() { return -1; }
+// expected-error at -1 {{multiversioned function must have a prototype}}
----------------
jroelofs wrote:

suggestion for another PR: a fixit that adds the `(void)` would be pretty slick.

https://github.com/llvm/llvm-project/pull/85454


More information about the cfe-commits mailing list