================ @@ -6697,6 +6697,10 @@ static bool canPassInRegisters(Sema &S, CXXRecordDecl *D, if (D->isDependentType() || D->isInvalidDecl()) return false; + for (const CXXMethodDecl *MD : D->methods()) { ---------------- erichkeane wrote:
I'm not sure where the RIGHT place for this to happen is, but this function very much does not seem like the right one. I would expect that the caller to this should 'give up' if there isn't value to calling this. Alternatively, the copy-constructor querying could possibly look into this instead when it is inspecting for the actual method it cares about. This patch also is checking ALL methods, which seems wrong. An arbitrary invalid method in the type shouldn't change the answer to this. https://github.com/llvm/llvm-project/pull/124819 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits