[clang] [FMV] Allow multi versioning without default declaration. (PR #85454)
Alexandros Lamprineas via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 22 10:10:57 PDT 2024
================
@@ -70,17 +69,23 @@ int __attribute__((target_version("lse"))) extc(void) { return 1; }
auto __attribute__((target_version("default"))) ret1(void) { return 1; }
auto __attribute__((target_version("dpb"))) ret2(void) { return 1; }
+// expected-error at -1 {{attribute 'target_version' multiversioned functions do not yet support deduced return types}}
auto __attribute__((target_version("dpb2"))) ret3(void) -> int { return 1; }
class Cls {
__attribute__((target_version("rng"))) Cls();
+ // expected-error at -1 {{attribute 'target_version' multiversioned functions do not yet support constructors}}
__attribute__((target_version("sve-i8mm"))) ~Cls();
+ // expected-error at -1 {{attribute 'target_version' multiversioned functions do not yet support destructors}}
Cls &__attribute__((target_version("f32mm"))) operator=(const Cls &) = default;
+ // expected-error at -1 {{attribute 'target_version' multiversioned functions do not yet support defaulted functions}}
Cls &__attribute__((target_version("ssbs"))) operator=(Cls &&) = delete;
+ // expected-error at -1 {{attribute 'target_version' multiversioned functions do not yet support deleted functions}}
----------------
labrinea wrote:
Without a default declaration target_version was ignored so these errors wouldn't trigger.
https://github.com/llvm/llvm-project/pull/85454
More information about the cfe-commits
mailing list