diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-17 00:21:28 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-17 00:21:28 +0000 |
commit | e38be617437ccdcc180c5a49e447cbcd07539292 (patch) | |
tree | 49bbb2e609b767a523648d1ac6c2c5714190ac6d /lib/AST/ASTContext.cpp | |
parent | e3c60a7ce9e0f42c7ca2344b33203266aceca1db (diff) |
Fixes synthesis of type for the object which holds info.
about a __block cxx object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119411 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 6823fa08d3..12a92f8ac6 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -3282,6 +3282,13 @@ bool ASTContext::BlockRequiresCopying(QualType Ty) { return true; if (Ty->isObjCObjectPointerType()) return true; + if (getLangOptions().CPlusPlus) { + if (const RecordType *RT = Ty->getAs<RecordType>()) { + CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl()); + return RD->hasConstCopyConstructor(*this); + + } + } return false; } |