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

This is wrong. The new declaration cannot be a redeclaration of the old, and at 
the same time to be causing Multiversioning. Getting past the early return 
(line 11538 with the new code) means the new declaration is causing 
Multiversioning, so at this point (line 11554 with the new code) redeclaration 
is not possible for the target_version attribute.

https://github.com/llvm/llvm-project/pull/96628
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to