================
@@ -11868,8 +11868,10 @@ static bool CheckMultiVersionFunction(Sema &S, 
FunctionDecl *NewFD,
     return false;
 
   if (!OldDecl || !OldDecl->getAsFunction() ||
-      OldDecl->getDeclContext()->getRedeclContext() !=
-          NewFD->getDeclContext()->getRedeclContext()) {
+      (OldDecl->getDeclContext()->getRedeclContext() !=
+           NewFD->getDeclContext()->getRedeclContext() &&
+       OldDecl->getDeclContext()->getEnclosingNamespaceContext() !=
+           NewFD->getDeclContext()->getEnclosingNamespaceContext())) {
----------------
labrinea wrote:

Thanks for the suggestion! I'll push a revised version.

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

Reply via email to