From 1ad04d95bccb9cc80bcdfd148b29efb59c6d38d7 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 25 Apr 2012 18:28:49 +0000 Subject: PR12625: Cope with classes which have incomplete base or member types: Don't try to query whether an incomplete type has a trivial copy constructor when determining whether a move constructor should be declared. llvm-svn: 155575 --- clang/lib/Sema/SemaDeclCXX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib') diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 8645de1fcd6..5267499ea4e 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -8165,7 +8165,7 @@ hasMoveOrIsTriviallyCopyable(Sema &S, QualType Type, bool IsConstructor) { // reference types, are supposed to return false here, but that appears // to be a standard defect. CXXRecordDecl *ClassDecl = Type->getAsCXXRecordDecl(); - if (!ClassDecl) + if (!ClassDecl || !ClassDecl->getDefinition()) return true; if (Type.isTriviallyCopyableType(S.Context)) -- cgit v1.2.3