[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)
Alexandros Lamprineas via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 28 04:18:00 PDT 2024
================
@@ -11576,22 +11584,6 @@ static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD,
}
}
- if (NewTVA) {
----------------
labrinea wrote:
This is checking things like
```
//expected-note at +1 {{previous declaration is here}}
void __attribute__((target_version("bti+flagm2"))) one(void) {}
//expected-error at +1 {{multiversioned function redeclarations require identical target attributes}}
void __attribute__((target_version("flagm2+bti"))) one(void) {}
```
(example taken from clang/test/Sema/attr-target-version.c)
At this point we know that the new declaration is triggering multiversioning therefore the old was the (implicit or explicit) default.
https://github.com/llvm/llvm-project/pull/96628
More information about the cfe-commits
mailing list