summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-07-23 04:23:39 +0000
committerDouglas Gregor <dgregor@apple.com>2012-07-23 04:23:39 +0000
commit6fa6942dda7fa608d8eeabd3e81b7423f5678090 (patch)
tree5e71329d686be82f3a1034b3c123460339585fb0 /clang/lib/Sema
parent505df2340ade21487c9fafe0f8075ddf7f66197e (diff)
downloadbcm5719-llvm-6fa6942dda7fa608d8eeabd3e81b7423f5678090.tar.gz
bcm5719-llvm-6fa6942dda7fa608d8eeabd3e81b7423f5678090.zip
When we have an Objective-C object with non-trivial lifetime in a
structor class under ARC, that struct/class does not have a trivial move constructor or move assignment operator. Fixes the rest of <rdar://problem/11738725>. llvm-svn: 160615
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 430ce9f7f78..52aa5b72d19 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -10026,7 +10026,7 @@ void Sema::ActOnFields(Scope* S,
// However, here we check whether this particular class is only
// non-POD because of the presence of an Objective-C pointer member.
// If so, objects of this type cannot be shared between code compiled
- // with instant objects and code compiled with manual retain/release.
+ // with ARC and code compiled with manual retain/release.
if (getLangOpts().ObjCAutoRefCount &&
CXXRecord->hasObjectMember() &&
CXXRecord->getLinkage() == ExternalLinkage) {
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 2a5c0dae436..8f03f81e565 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -2774,7 +2774,7 @@ BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
FieldBaseElementType->isObjCRetainableType() &&
FieldBaseElementType.getObjCLifetime() != Qualifiers::OCL_None &&
FieldBaseElementType.getObjCLifetime() != Qualifiers::OCL_ExplicitNone) {
- // Instant objects:
+ // ARC:
// Default-initialize Objective-C pointers to NULL.
CXXMemberInit
= new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context, Field,
OpenPOWER on IntegriCloud