[clang] [FMV] Allow target version definitions in any order. (PR #83887)

Pavel Iliin via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 5 03:20:03 PST 2024


================
@@ -11455,9 +11465,8 @@ static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD,
   }
 
   // If this is 'default', permit the forward declaration.
-  if (!OldFD->isMultiVersion() &&
-      ((NewTA && NewTA->isDefaultVersion() && !OldTA) ||
-       (NewTVA && NewTVA->isDefaultVersion() && !OldTVA))) {
+  if ((NewTA && NewTA->isDefaultVersion() && !OldTA) ||
----------------
ilinpv wrote:

Seems we are changing "target" attribute semantic here as well that we would like to avoid, why are we sure that !OldFD->isMultiVersion() is always true ?

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


More information about the cfe-commits mailing list