https://github.com/vortex73 created 
https://github.com/llvm/llvm-project/pull/124819

None

>From cee34e7727b0f8b9440b0d687a2da2f0b4734c15 Mon Sep 17 00:00:00 2001
From: Narayan Sreekumar <nsreekum...@gmail.com>
Date: Wed, 29 Jan 2025 00:11:23 +0530
Subject: [PATCH] [Clang] Fixed invalid virtual copy constructor assertion

---
 clang/lib/Sema/SemaDeclCXX.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index c5a72cf812ebc9..d935292191ea58 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -6697,6 +6697,10 @@ static bool canPassInRegisters(Sema &S, CXXRecordDecl *D,
   if (D->isDependentType() || D->isInvalidDecl())
     return false;
 
+  for (const CXXMethodDecl *MD : D->methods()) {
+    if (MD->isInvalidDecl())
+      return false;
+  }
   // Clang <= 4 used the pre-C++11 rule, which ignores move operations.
   // The PS4 platform ABI follows the behavior of Clang 3.2.
   if (CCK == TargetInfo::CCK_ClangABI4OrPS4)

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to