[clang] [clang][FMV] Allow declaration of function versions in namespaces. (PR #93044)
Alexandros Lamprineas via cfe-commits
cfe-commits at lists.llvm.org
Thu May 23 01:50:17 PDT 2024
================
@@ -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
More information about the cfe-commits
mailing list