================ @@ -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())) { ---------------- efriedma-quic wrote:
```suggestion !OldDecl->getDeclContext()->getRedeclContext()->Equals( NewFD->getDeclContext()->getRedeclContext())) { ``` 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