[cfe-commits] r133779 - in /cfe/trunk: include/clang/AST/ include/clang/Basic/ include/clang/Sema/ lib/ARCMigrate/ lib/AST/ lib/Frontend/ lib/Sema/ test/ARCMT/ test/SemaObjC/ test/SemaObjCXX/
Argyrios Kyrtzidis
akyrtzi at gmail.com
Thu Jun 23 17:08:59 PDT 2011
Author: akirtzidis
Date: Thu Jun 23 19:08:59 2011
New Revision: 133779
URL: http://llvm.org/viewvc/llvm-project?rev=133779&view=rev
Log:
Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'.
rdar://9477613.
Modified:
cfe/trunk/include/clang/AST/Type.h
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/include/clang/Sema/AttributeList.h
cfe/trunk/lib/ARCMigrate/TransProperties.cpp
cfe/trunk/lib/AST/TypePrinter.cpp
cfe/trunk/lib/Frontend/InitPreprocessor.cpp
cfe/trunk/lib/Sema/AttributeList.cpp
cfe/trunk/lib/Sema/JumpDiagnostics.cpp
cfe/trunk/lib/Sema/SemaChecking.cpp
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/lib/Sema/SemaExprCXX.cpp
cfe/trunk/lib/Sema/SemaObjCProperty.cpp
cfe/trunk/lib/Sema/SemaOverload.cpp
cfe/trunk/lib/Sema/SemaType.cpp
cfe/trunk/lib/Sema/TreeTransform.h
cfe/trunk/test/ARCMT/checking.m
cfe/trunk/test/SemaObjC/arc-decls.m
cfe/trunk/test/SemaObjC/arc-non-pod-memaccess.m
cfe/trunk/test/SemaObjC/arc-property-decl-attrs.m
cfe/trunk/test/SemaObjC/arc-property-lifetime.m
cfe/trunk/test/SemaObjC/arc-property.m
cfe/trunk/test/SemaObjC/arc-system-header.m
cfe/trunk/test/SemaObjC/arc-type-conversion.m
cfe/trunk/test/SemaObjC/arc.m
cfe/trunk/test/SemaObjCXX/arc-non-pod.mm
cfe/trunk/test/SemaObjCXX/arc-object-init-destroy.mm
cfe/trunk/test/SemaObjCXX/arc-overloading.mm
cfe/trunk/test/SemaObjCXX/arc-system-header.mm
cfe/trunk/test/SemaObjCXX/arc-type-conversion.mm
cfe/trunk/test/SemaObjCXX/gc-attributes.mm
Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Thu Jun 23 19:08:59 2011
@@ -3152,7 +3152,7 @@
// Enumerated operand (string or keyword).
attr_objc_gc,
- attr_objc_lifetime,
+ attr_objc_ownership,
attr_pcs,
FirstEnumOperandKind = attr_objc_gc,
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Thu Jun 23 19:08:59 2011
@@ -1181,9 +1181,9 @@
"automatic variable qualified with an address space">;
def err_arg_with_address_space : Error<
"parameter may not be qualified with an address space">;
-def err_attr_objc_lifetime_bad_type : Error<
+def err_attr_objc_ownership_bad_type : Error<
"the type %0 cannot be retained">;
-def err_attr_objc_lifetime_redundant : Error<
+def err_attr_objc_ownership_redundant : Error<
"the type %0 already has retainment attributes set on it">;
def err_attribute_not_string : Error<
"argument to %0 attribute was not a string literal">;
@@ -1603,8 +1603,8 @@
"function (the implicit move assignment operator)|"
"constructor (inherited)}0%1 not viable: "
"%select{%ordinal6|'this'}5 argument (%2) has %select{no|__weak|__strong}3 "
- "lifetime, but parameter has %select{no|__weak|__strong}4 lifetime">;
-def note_ovl_candidate_bad_lifetime : Note<"candidate "
+ "ownership, but parameter has %select{no|__weak|__strong}4 ownership">;
+def note_ovl_candidate_bad_ownership : Note<"candidate "
"%select{function|function|constructor|"
"function |function |constructor |"
"constructor (the implicit default constructor)|"
@@ -1612,9 +1612,9 @@
"function (the implicit copy assignment operator)|"
"constructor (inherited)}0%1 not viable: "
"%select{%ordinal6|'this'}5 argument (%2) has "
- "%select{no|__unsafe_unretained|__strong|__weak|__autoreleasing}3 lifetime,"
+ "%select{no|__unsafe_unretained|__strong|__weak|__autoreleasing}3 ownership,"
" but parameter has %select{no|__unsafe_unretained|__strong|__weak|"
- "__autoreleasing}4 lifetime">;
+ "__autoreleasing}4 ownership">;
def note_ovl_candidate_bad_cvr_this : Note<"candidate "
"%select{|function|||function||||"
"function (the implicit copy assignment operator)|}0 not viable: "
@@ -2498,7 +2498,7 @@
"jump bypasses initialization of catch block">;
def note_protected_by___block : Note<
"jump bypasses setup of __block variable">;
-def note_protected_by_objc_lifetime : Note<
+def note_protected_by_objc_ownership : Note<
"jump bypasses initialization of retaining variable">;
def note_exits_cleanup : Note<
@@ -2521,7 +2521,7 @@
"jump exits catch block">;
def note_exits_objc_autoreleasepool : Note<
"jump exits autoreleasepool block">;
-def note_exits_objc_lifetime : Note<
+def note_exits_objc_ownership : Note<
"jump exits scope of retaining variable">;
def err_func_returning_array_function : Error<
@@ -2608,22 +2608,22 @@
"code; add a non-trivial %select{copy constructor|copy assignment operator|"
"destructor}1 to make it ABI-compatible">,
InGroup<AutomaticReferenceCountingABI>, DefaultIgnore;
-def err_arc_new_array_without_lifetime : Error<
- "'new' cannot allocate an array of %0 with no explicit lifetime">;
+def err_arc_new_array_without_ownership : Error<
+ "'new' cannot allocate an array of %0 with no explicit ownership">;
def warn_err_new_delete_object_array : Warning<
"%select{allocating|destroying}0 an array of %1; this array must not "
"%select{be deleted in|have been allocated from}0 non-ARC code">,
InGroup<AutomaticReferenceCountingABI>, DefaultIgnore;
def err_arc_autoreleasing_var : Error<
"%select{__block variables|global variables|fields|ivars}0 cannot have "
- "__autoreleasing lifetime">;
-def err_arc_thread_lifetime : Error<
- "thread-local variable has non-trivial lifetime: type is %0">;
-def err_arc_indirect_no_lifetime : Error<
- "%select{pointer|reference}1 to non-const type %0 with no explicit lifetime">,
+ "__autoreleasing ownership">;
+def err_arc_thread_ownership : Error<
+ "thread-local variable has non-trivial ownership: type is %0">;
+def err_arc_indirect_no_ownership : Error<
+ "%select{pointer|reference}1 to non-const type %0 with no explicit ownership">,
InGroup<AutomaticReferenceCounting>;
-def err_arc_array_param_no_lifetime : Error<
- "must explicitly describe intended lifetime of an object array parameter">;
+def err_arc_array_param_no_ownership : Error<
+ "must explicitly describe intended ownership of an object array parameter">;
def err_arc_pseudo_dtor_inconstant_quals : Error<
"pseudo-destructor destroys object of type %0 with inconsistently-qualified "
"type %1">;
@@ -2650,24 +2650,24 @@
def note_arc_retain_cycle_owner : Note<
"block will be retained by %select{the captured object|an object strongly "
"retained by the captured object}0">;
-def note_nontrivial_objc_lifetime : Note<
+def note_nontrivial_objc_ownership : Note<
"because type %0 has %select{no|no|__strong|__weak|__autoreleasing}1 "
- "lifetime">;
+ "ownership">;
def warn_arc_object_memaccess : Warning<
"%select{destination for|source of}0 this %1 call is a pointer to "
- "lifetime-qualified type %2">, InGroup<ARCNonPodMemAccess>;
+ "ownership-qualified type %2">, InGroup<ARCNonPodMemAccess>;
-def err_arc_strong_property_lifetime : Error<
+def err_arc_strong_property_ownership : Error<
"existing ivar %1 for strong property %0 may not be "
"%select{|__unsafe_unretained||__weak}2">;
-def err_arc_assign_property_lifetime : Error<
+def err_arc_assign_property_ownership : Error<
"existing ivar %1 for unsafe_unretained property %0 must be __unsafe_unretained">;
-def err_arc_inconsistent_property_lifetime : Error<
+def err_arc_inconsistent_property_ownership : Error<
"%select{strong|weak|unsafe_unretained}1 property %0 may not also be "
"declared %select{|__unsafe_unretained|__strong|__weak|__autoreleasing}2">;
-def err_arc_atomic_lifetime : Error<
+def err_arc_atomic_ownership : Error<
"cannot perform atomic operation on a pointer to type %0: type has "
- "non-trivial lifetime">;
+ "non-trivial ownership">;
def err_arc_bridge_cast_incompatible : Error<
"incompatible types casting %0 to %1 with a %select{__bridge|"
@@ -3541,7 +3541,7 @@
"|sending %0 to parameter of type %1"
"|casting %0 to type %1}2"
" changes address space of pointer">;
-def err_typecheck_incompatible_lifetime : Error<
+def err_typecheck_incompatible_ownership : Error<
"%select{assigning %1 to %0"
"|passing %0 to parameter of type %1"
"|returning %0 from a function with result type %1"
Modified: cfe/trunk/include/clang/Sema/AttributeList.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/AttributeList.h?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/AttributeList.h (original)
+++ cfe/trunk/include/clang/Sema/AttributeList.h Thu Jun 23 19:08:59 2011
@@ -206,7 +206,7 @@
AT_ns_consumed, // Clang-specific.
AT_ns_consumes_self, // Clang-specific.
AT_objc_gc,
- AT_objc_lifetime, // Clang-specific.
+ AT_objc_ownership, // Clang-specific.
AT_objc_precise_lifetime, // Clang-specific.
AT_opencl_image_access, // OpenCL-specific.
AT_opencl_kernel_function, // OpenCL-specific.
Modified: cfe/trunk/lib/ARCMigrate/TransProperties.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/TransProperties.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/TransProperties.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/TransProperties.cpp Thu Jun 23 19:08:59 2011
@@ -116,7 +116,7 @@
Transaction Trans(Pass.TA);
Pass.TA.insert(prop.IvarD->getLocation(), "__weak ");
- Pass.TA.clearDiagnostic(diag::err_arc_assign_property_lifetime,
+ Pass.TA.clearDiagnostic(diag::err_arc_assign_property_ownership,
prop.ArcPropAssignErrorLoc);
}
@@ -126,7 +126,7 @@
if (PI->ShouldChangeToWeak) {
Transaction Trans(Pass.TA);
Pass.TA.insert(PI->IvarD->getLocation(), "__unsafe_unretained ");
- Pass.TA.clearDiagnostic(diag::err_arc_assign_property_lifetime,
+ Pass.TA.clearDiagnostic(diag::err_arc_assign_property_ownership,
PI->ArcPropAssignErrorLoc);
}
}
@@ -151,7 +151,7 @@
!= Qualifiers::OCL_Strong)
return true;
if (!Pass.TA.hasDiagnostic(
- diag::err_arc_assign_property_lifetime, D->getLocation()))
+ diag::err_arc_assign_property_ownership, D->getLocation()))
return true;
// There is a "error: existing ivar for assign property must be
@@ -162,7 +162,7 @@
Transaction Trans(Pass.TA);
Pass.TA.insert(ivarD->getLocation(), "__unsafe_unretained ");
Pass.TA.clearDiagnostic(
- diag::err_arc_assign_property_lifetime, D->getLocation());
+ diag::err_arc_assign_property_ownership, D->getLocation());
} else {
// Mark that we want the ivar to become weak.
unsigned loc = SM.getInstantiationLoc(propD->getAtLoc()).getRawEncoding();
Modified: cfe/trunk/lib/AST/TypePrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TypePrinter.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/AST/TypePrinter.cpp (original)
+++ cfe/trunk/lib/AST/TypePrinter.cpp Thu Jun 23 19:08:59 2011
@@ -845,9 +845,9 @@
void TypePrinter::printAttributed(const AttributedType *T,
std::string &S) {
- // Prefer the macro forms of the GC and lifetime qualifiers.
+ // Prefer the macro forms of the GC and ownership qualifiers.
if (T->getAttrKind() == AttributedType::attr_objc_gc ||
- T->getAttrKind() == AttributedType::attr_objc_lifetime)
+ T->getAttrKind() == AttributedType::attr_objc_ownership)
return print(T->getEquivalentType(), S);
print(T->getModifiedType(), S);
@@ -916,10 +916,10 @@
break;
}
- case AttributedType::attr_objc_lifetime:
- S += "objc_lifetime(";
+ case AttributedType::attr_objc_ownership:
+ S += "objc_ownership(";
switch (T->getEquivalentType().getObjCLifetime()) {
- case Qualifiers::OCL_None: llvm_unreachable("no lifetime!"); break;
+ case Qualifiers::OCL_None: llvm_unreachable("no ownership!"); break;
case Qualifiers::OCL_ExplicitNone: S += "none"; break;
case Qualifiers::OCL_Strong: S += "strong"; break;
case Qualifiers::OCL_Weak: S += "weak"; break;
Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Thu Jun 23 19:08:59 2011
@@ -244,8 +244,8 @@
Out << "template <class _Tp>\n"
<< "inline __attribute__ ((__visibility__(\"hidden\"), "
<< "__always_inline__))\n"
- << "__attribute__((objc_lifetime(strong))) _Tp*\n"
- << "addressof(__attribute__((objc_lifetime(strong))) _Tp& __x) {\n"
+ << "__attribute__((objc_ownership(strong))) _Tp*\n"
+ << "addressof(__attribute__((objc_ownership(strong))) _Tp& __x) {\n"
<< " return &__x;\n"
<< "}\n"
<< "\n";
@@ -254,8 +254,8 @@
Out << "template <class _Tp>\n"
<< "inline __attribute__ ((__visibility__(\"hidden\"),"
<< "__always_inline__))\n"
- << "__attribute__((objc_lifetime(weak))) _Tp*\n"
- << "addressof(__attribute__((objc_lifetime(weak))) _Tp& __x) {\n"
+ << "__attribute__((objc_ownership(weak))) _Tp*\n"
+ << "addressof(__attribute__((objc_ownership(weak))) _Tp& __x) {\n"
<< " return &__x;\n"
<< "};\n"
<< "\n";
@@ -264,8 +264,8 @@
Out << "template <class _Tp>\n"
<< "inline __attribute__ ((__visibility__(\"hidden\"),"
<< "__always_inline__))\n"
- << "__attribute__((objc_lifetime(autoreleasing))) _Tp*\n"
- << "addressof(__attribute__((objc_lifetime(autoreleasing))) _Tp& __x) "
+ << "__attribute__((objc_ownership(autoreleasing))) _Tp*\n"
+ << "addressof(__attribute__((objc_ownership(autoreleasing))) _Tp& __x) "
<< "{\n"
<< " return &__x;\n"
<< "}\n"
@@ -312,7 +312,7 @@
<< "\n";
Out << "template<typename _Tp>\n"
- << "struct __is_scalar<__attribute__((objc_lifetime(strong))) _Tp> {\n"
+ << "struct __is_scalar<__attribute__((objc_ownership(strong))) _Tp> {\n"
<< " enum { __value = 0 };\n"
<< " typedef __false_type __type;\n"
<< "};\n"
@@ -320,7 +320,7 @@
if (!LangOpts.ObjCNoAutoRefCountRuntime) {
Out << "template<typename _Tp>\n"
- << "struct __is_scalar<__attribute__((objc_lifetime(weak))) _Tp> {\n"
+ << "struct __is_scalar<__attribute__((objc_ownership(weak))) _Tp> {\n"
<< " enum { __value = 0 };\n"
<< " typedef __false_type __type;\n"
<< "};\n"
@@ -328,7 +328,7 @@
}
Out << "template<typename _Tp>\n"
- << "struct __is_scalar<__attribute__((objc_lifetime(autoreleasing)))"
+ << "struct __is_scalar<__attribute__((objc_ownership(autoreleasing)))"
<< " _Tp> {\n"
<< " enum { __value = 0 };\n"
<< " typedef __false_type __type;\n"
@@ -614,12 +614,12 @@
Builder.defineMacro("__FAST_RELAXED_MATH__");
if (LangOpts.ObjCAutoRefCount) {
- Builder.defineMacro("__weak", "__attribute__((objc_lifetime(weak)))");
- Builder.defineMacro("__strong", "__attribute__((objc_lifetime(strong)))");
+ Builder.defineMacro("__weak", "__attribute__((objc_ownership(weak)))");
+ Builder.defineMacro("__strong", "__attribute__((objc_ownership(strong)))");
Builder.defineMacro("__autoreleasing",
- "__attribute__((objc_lifetime(autoreleasing)))");
+ "__attribute__((objc_ownership(autoreleasing)))");
Builder.defineMacro("__unsafe_unretained",
- "__attribute__((objc_lifetime(none)))");
+ "__attribute__((objc_ownership(none)))");
}
// Get other target #defines.
Modified: cfe/trunk/lib/Sema/AttributeList.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/AttributeList.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/AttributeList.cpp (original)
+++ cfe/trunk/lib/Sema/AttributeList.cpp Thu Jun 23 19:08:59 2011
@@ -180,7 +180,7 @@
.Case("cf_returns_autoreleased", AT_cf_returns_autoreleased)
.Case("ns_consumes_self", AT_ns_consumes_self)
.Case("ns_consumed", AT_ns_consumed)
- .Case("objc_lifetime", AT_objc_lifetime)
+ .Case("objc_ownership", AT_objc_ownership)
.Case("objc_precise_lifetime", AT_objc_precise_lifetime)
.Case("ownership_returns", AT_ownership_returns)
.Case("ownership_holds", AT_ownership_holds)
Modified: cfe/trunk/lib/Sema/JumpDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/JumpDiagnostics.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/JumpDiagnostics.cpp (original)
+++ cfe/trunk/lib/Sema/JumpDiagnostics.cpp Thu Jun 23 19:08:59 2011
@@ -138,8 +138,8 @@
case Qualifiers::OCL_Strong:
case Qualifiers::OCL_Weak:
- return ScopePair(diag::note_protected_by_objc_lifetime,
- diag::note_exits_objc_lifetime);
+ return ScopePair(diag::note_protected_by_objc_ownership,
+ diag::note_exits_objc_ownership);
}
}
Modified: cfe/trunk/lib/Sema/SemaChecking.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Thu Jun 23 19:08:59 2011
@@ -436,7 +436,7 @@
case Qualifiers::OCL_Weak:
case Qualifiers::OCL_Strong:
case Qualifiers::OCL_Autoreleasing:
- Diag(DRE->getLocStart(), diag::err_arc_atomic_lifetime)
+ Diag(DRE->getLocStart(), diag::err_arc_atomic_ownership)
<< ValType << FirstArg->getSourceRange();
return ExprError();
}
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu Jun 23 19:08:59 2011
@@ -3518,7 +3518,7 @@
// Thread-local variables cannot have lifetime.
if (lifetime && lifetime != Qualifiers::OCL_ExplicitNone &&
var->isThreadSpecified()) {
- Diag(var->getLocation(), diag::err_arc_thread_lifetime)
+ Diag(var->getLocation(), diag::err_arc_thread_ownership)
<< var->getType();
return true;
}
@@ -6137,7 +6137,7 @@
// - otherwise, it's an error
if (T->isArrayType()) {
if (!T.isConstQualified()) {
- Diag(NameLoc, diag::err_arc_array_param_no_lifetime)
+ Diag(NameLoc, diag::err_arc_array_param_no_ownership)
<< TSInfo->getTypeLoc().getSourceRange();
}
lifetime = Qualifiers::OCL_ExplicitNone;
@@ -7902,7 +7902,7 @@
if (getSourceManager().isInSystemHeader(Loc)) {
if (!FD->hasAttr<UnavailableAttr>())
FD->addAttr(new (Context) UnavailableAttr(Loc, Context,
- "this system field has retaining lifetime"));
+ "this system field has retaining ownership"));
return false;
}
}
@@ -8069,7 +8069,7 @@
case Qualifiers::OCL_Autoreleasing:
case Qualifiers::OCL_Weak:
case Qualifiers::OCL_Strong:
- Diag((*fi)->getLocation(), diag::note_nontrivial_objc_lifetime)
+ Diag((*fi)->getLocation(), diag::note_nontrivial_objc_ownership)
<< QT << EltTy.getObjCLifetime();
return;
}
@@ -8386,7 +8386,7 @@
if (getSourceManager().isInSystemHeader(loc)) {
if (!FD->hasAttr<UnavailableAttr>()) {
FD->addAttr(new (Context) UnavailableAttr(loc, Context,
- "this system field has retaining lifetime"));
+ "this system field has retaining ownership"));
}
} else {
Diag(FD->getLocation(), diag::err_arc_objc_object_in_struct);
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Thu Jun 23 19:08:59 2011
@@ -2780,7 +2780,7 @@
};
}
-static void HandleObjCLifetimeAttr(Decl *d, const AttributeList &attr,
+static void HandleObjCOwnershipAttr(Decl *d, const AttributeList &attr,
Sema &S) {
if (hasDeclarator(d)) return;
@@ -2978,8 +2978,8 @@
case AttributeList::AT_shared: HandleSharedAttr (D, Attr, S); break;
case AttributeList::AT_vecreturn: HandleVecReturnAttr (D, Attr, S); break;
- case AttributeList::AT_objc_lifetime:
- HandleObjCLifetimeAttr(D, Attr, S); break;
+ case AttributeList::AT_objc_ownership:
+ HandleObjCOwnershipAttr(D, Attr, S); break;
case AttributeList::AT_objc_precise_lifetime:
HandleObjCPreciseLifetimeAttr(D, Attr, S); break;
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Thu Jun 23 19:08:59 2011
@@ -4053,7 +4053,7 @@
ExprPtr->getPointeeType()->isObjCLifetimeType() &&
!CastQuals.compatiblyIncludesObjCLifetime(ExprQuals)) {
Diag(castExpr->getLocStart(),
- diag::err_typecheck_incompatible_lifetime)
+ diag::err_typecheck_incompatible_ownership)
<< castExprType << castType << AA_Casting
<< castExpr->getSourceRange();
@@ -8587,7 +8587,7 @@
} else if (lhq.getObjCLifetime() != rhq.getObjCLifetime()) {
- DiagKind = diag::err_typecheck_incompatible_lifetime;
+ DiagKind = diag::err_typecheck_incompatible_ownership;
break;
}
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Thu Jun 23 19:08:59 2011
@@ -1144,7 +1144,7 @@
QualType BaseAllocType = Context.getBaseElementType(AT);
if (BaseAllocType.getObjCLifetime() == Qualifiers::OCL_None &&
BaseAllocType->isObjCLifetimeType())
- return Diag(Loc, diag::err_arc_new_array_without_lifetime)
+ return Diag(Loc, diag::err_arc_new_array_without_ownership)
<< BaseAllocType;
}
}
Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Thu Jun 23 19:08:59 2011
@@ -63,7 +63,7 @@
property->setInvalidDecl();
S.Diag(property->getLocation(),
- diag::err_arc_inconsistent_property_lifetime)
+ diag::err_arc_inconsistent_property_ownership)
<< property->getDeclName()
<< selector
<< propertyLifetime;
@@ -420,7 +420,7 @@
case Qualifiers::OCL_ExplicitNone:
case Qualifiers::OCL_Weak:
- S.Diag(propertyImplLoc, diag::err_arc_strong_property_lifetime)
+ S.Diag(propertyImplLoc, diag::err_arc_strong_property_ownership)
<< property->getDeclName()
<< ivar->getDeclName()
<< ivarLifetime;
@@ -463,7 +463,7 @@
case Qualifiers::OCL_Weak:
case Qualifiers::OCL_Strong:
- S.Diag(propertyImplLoc, diag::err_arc_assign_property_lifetime)
+ S.Diag(propertyImplLoc, diag::err_arc_assign_property_ownership)
<< property->getDeclName()
<< ivar->getDeclName();
break;
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Thu Jun 23 19:08:59 2011
@@ -6805,7 +6805,7 @@
}
if (FromQs.getObjCLifetime() != ToQs.getObjCLifetime()) {
- S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_lifetime)
+ S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_ownership)
<< (unsigned) FnKind << FnDesc
<< (FromExpr ? FromExpr->getSourceRange() : SourceRange())
<< FromTy
Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Thu Jun 23 19:08:59 2011
@@ -112,7 +112,7 @@
// smallest available pointer type (i.e. 'void*' in 'void**').
#define OBJC_POINTER_TYPE_ATTRS_CASELIST \
case AttributeList::AT_objc_gc: \
- case AttributeList::AT_objc_lifetime
+ case AttributeList::AT_objc_ownership
// Function type attributes.
#define FUNCTION_TYPE_ATTRS_CASELIST \
@@ -297,15 +297,15 @@
static bool handleObjCGCTypeAttr(TypeProcessingState &state,
AttributeList &attr, QualType &type);
-static bool handleObjCLifetimeTypeAttr(TypeProcessingState &state,
+static bool handleObjCOwnershipTypeAttr(TypeProcessingState &state,
AttributeList &attr, QualType &type);
static bool handleObjCPointerTypeAttr(TypeProcessingState &state,
AttributeList &attr, QualType &type) {
if (attr.getKind() == AttributeList::AT_objc_gc)
return handleObjCGCTypeAttr(state, attr, type);
- assert(attr.getKind() == AttributeList::AT_objc_lifetime);
- return handleObjCLifetimeTypeAttr(state, attr, type);
+ assert(attr.getKind() == AttributeList::AT_objc_ownership);
+ return handleObjCOwnershipTypeAttr(state, attr, type);
}
/// Given that an objc_gc attribute was written somewhere on a
@@ -1065,9 +1065,9 @@
if (S.DelayedDiagnostics.shouldDelayDiagnostics()) {
S.DelayedDiagnostics.add(
sema::DelayedDiagnostic::makeForbiddenType(loc,
- diag::err_arc_indirect_no_lifetime, type, isReference));
+ diag::err_arc_indirect_no_ownership, type, isReference));
} else {
- S.Diag(loc, diag::err_arc_indirect_no_lifetime) << type << isReference;
+ S.Diag(loc, diag::err_arc_indirect_no_ownership) << type << isReference;
}
implicitLifetime = Qualifiers::OCL_Autoreleasing;
}
@@ -1647,13 +1647,13 @@
chunk.Kind == DeclaratorChunk::BlockPointer);
for (const AttributeList *attr = chunk.getAttrs(); attr;
attr = attr->getNext())
- if (attr->getKind() == AttributeList::AT_objc_lifetime)
+ if (attr->getKind() == AttributeList::AT_objc_ownership)
return;
// If there wasn't one, add one (with an invalid source location
// so that we don't make an AttributedType for it).
AttributeList *attr = declarator.getAttributePool()
- .create(&S.Context.Idents.get("objc_lifetime"), SourceLocation(),
+ .create(&S.Context.Idents.get("objc_ownership"), SourceLocation(),
/*scope*/ 0, SourceLocation(),
&S.Context.Idents.get("autoreleasing"), SourceLocation(),
/*args*/ 0, 0,
@@ -2474,8 +2474,8 @@
return AttributeList::AT_neon_polyvector_type;
case AttributedType::attr_objc_gc:
return AttributeList::AT_objc_gc;
- case AttributedType::attr_objc_lifetime:
- return AttributeList::AT_objc_lifetime;
+ case AttributedType::attr_objc_ownership:
+ return AttributeList::AT_objc_ownership;
case AttributedType::attr_noreturn:
return AttributeList::AT_noreturn;
case AttributedType::attr_cdecl:
@@ -2962,11 +2962,11 @@
Type = S.Context.getAddrSpaceQualType(Type, ASIdx);
}
-/// handleObjCLifetimeTypeAttr - Process an objc_lifetime
+/// handleObjCOwnershipTypeAttr - Process an objc_ownership
/// attribute on the specified type.
///
/// Returns 'true' if the attribute was handled.
-static bool handleObjCLifetimeTypeAttr(TypeProcessingState &state,
+static bool handleObjCOwnershipTypeAttr(TypeProcessingState &state,
AttributeList &attr,
QualType &type) {
if (!type->isObjCRetainableType() && !type->isDependentType())
@@ -2975,14 +2975,14 @@
Sema &S = state.getSema();
if (type.getQualifiers().getObjCLifetime()) {
- S.Diag(attr.getLoc(), diag::err_attr_objc_lifetime_redundant)
+ S.Diag(attr.getLoc(), diag::err_attr_objc_ownership_redundant)
<< type;
return true;
}
if (!attr.getParameterName()) {
S.Diag(attr.getLoc(), diag::err_attribute_argument_n_not_string)
- << "objc_lifetime" << 1;
+ << "objc_ownership" << 1;
attr.setInvalid();
return true;
}
@@ -2998,7 +2998,7 @@
lifetime = Qualifiers::OCL_Autoreleasing;
else {
S.Diag(attr.getLoc(), diag::warn_attribute_type_not_supported)
- << "objc_lifetime" << attr.getParameterName();
+ << "objc_ownership" << attr.getParameterName();
attr.setInvalid();
return true;
}
@@ -3016,7 +3016,7 @@
// If we have a valid source location for the attribute, use an
// AttributedType instead.
if (attr.getLoc().isValid())
- type = S.Context.getAttributedType(AttributedType::attr_objc_lifetime,
+ type = S.Context.getAttributedType(AttributedType::attr_objc_ownership,
origType, type);
// Forbid __weak if we don't have a runtime.
Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Thu Jun 23 19:08:59 2011
@@ -3197,7 +3197,7 @@
// Otherwise, complain about the addition of a qualifier to an
// already-qualified type.
SourceRange R = TLB.getTemporaryTypeLoc(Result).getSourceRange();
- SemaRef.Diag(R.getBegin(), diag::err_attr_objc_lifetime_redundant)
+ SemaRef.Diag(R.getBegin(), diag::err_attr_objc_ownership_redundant)
<< Result << R;
Quals.removeObjCLifetime();
Modified: cfe/trunk/test/ARCMT/checking.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/checking.m?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/checking.m (original)
+++ cfe/trunk/test/ARCMT/checking.m Thu Jun 23 19:08:59 2011
@@ -59,7 +59,7 @@
s = @selector(autorelease); // expected-error {{ARC forbids use of 'autorelease' in a @selector}}
s = @selector(dealloc); // expected-error {{ARC forbids use of 'dealloc' in a @selector}}
- static id __autoreleasing X1; // expected-error {{global variables cannot have __autoreleasing lifetime}}
+ static id __autoreleasing X1; // expected-error {{global variables cannot have __autoreleasing ownership}}
}
struct S {
@@ -100,7 +100,7 @@
(void)(int*)arg; // expected-error {{disallowed}}
(void)(id)arg;
(void)(__autoreleasing id*)arg; // expected-error {{disallowed}}
- (void)(id*)arg; // expected-error {{pointer to non-const type 'id' with no explicit lifetime}} expected-error {{disallowed}}
+ (void)(id*)arg; // expected-error {{pointer to non-const type 'id' with no explicit ownership}} expected-error {{disallowed}}
(void)(__autoreleasing id**)voidp_val;
(void)(void*)voidp_val;
Modified: cfe/trunk/test/SemaObjC/arc-decls.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-decls.m?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-decls.m (original)
+++ cfe/trunk/test/SemaObjC/arc-decls.m Thu Jun 23 19:08:59 2011
@@ -22,7 +22,7 @@
@end
struct S {
- id __attribute__((objc_lifetime(none))) i;
+ id __attribute__((objc_ownership(none))) i;
void * vp;
int i1;
};
@@ -31,17 +31,17 @@
@class NSError;
-__autoreleasing id X; // expected-error {{global variables cannot have __autoreleasing lifetime}}
-__autoreleasing NSError *E; // expected-error {{global variables cannot have __autoreleasing lifetime}}
+__autoreleasing id X; // expected-error {{global variables cannot have __autoreleasing ownership}}
+__autoreleasing NSError *E; // expected-error {{global variables cannot have __autoreleasing ownership}}
-extern id __autoreleasing X1; // expected-error {{global variables cannot have __autoreleasing lifetime}}
+extern id __autoreleasing X1; // expected-error {{global variables cannot have __autoreleasing ownership}}
void func()
{
id X;
- static id __autoreleasing X1; // expected-error {{global variables cannot have __autoreleasing lifetime}}
- extern id __autoreleasing E; // expected-error {{global variables cannot have __autoreleasing lifetime}}
+ static id __autoreleasing X1; // expected-error {{global variables cannot have __autoreleasing ownership}}
+ extern id __autoreleasing E; // expected-error {{global variables cannot have __autoreleasing ownership}}
}
Modified: cfe/trunk/test/SemaObjC/arc-non-pod-memaccess.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-non-pod-memaccess.m?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-non-pod-memaccess.m (original)
+++ cfe/trunk/test/SemaObjC/arc-non-pod-memaccess.m Thu Jun 23 19:08:59 2011
@@ -21,35 +21,35 @@
memset(aip, 0, 17);
memset(uip, 0, 17);
- memcpy(sip, ptr, 17); // expected-warning{{destination for this 'memcpy' call is a pointer to lifetime-qualified type}} \
+ memcpy(sip, ptr, 17); // expected-warning{{destination for this 'memcpy' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
- memcpy(wip, ptr, 17); // expected-warning{{destination for this 'memcpy' call is a pointer to lifetime-qualified type}} \
+ memcpy(wip, ptr, 17); // expected-warning{{destination for this 'memcpy' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
- memcpy(aip, ptr, 17); // expected-warning{{destination for this 'memcpy' call is a pointer to lifetime-qualified type}} \
+ memcpy(aip, ptr, 17); // expected-warning{{destination for this 'memcpy' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
memcpy(uip, ptr, 17);
- memcpy(ptr, sip, 17); // expected-warning{{source of this 'memcpy' call is a pointer to lifetime-qualified type}} \
+ memcpy(ptr, sip, 17); // expected-warning{{source of this 'memcpy' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
- memcpy(ptr, wip, 17); // expected-warning{{source of this 'memcpy' call is a pointer to lifetime-qualified type}} \
+ memcpy(ptr, wip, 17); // expected-warning{{source of this 'memcpy' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
- memcpy(ptr, aip, 17); // expected-warning{{source of this 'memcpy' call is a pointer to lifetime-qualified type}} \
+ memcpy(ptr, aip, 17); // expected-warning{{source of this 'memcpy' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
memcpy(ptr, uip, 17);
- memmove(sip, ptr, 17); // expected-warning{{destination for this 'memmove' call is a pointer to lifetime-qualified type}} \
+ memmove(sip, ptr, 17); // expected-warning{{destination for this 'memmove' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
- memmove(wip, ptr, 17); // expected-warning{{destination for this 'memmove' call is a pointer to lifetime-qualified type}} \
+ memmove(wip, ptr, 17); // expected-warning{{destination for this 'memmove' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
- memmove(aip, ptr, 17); // expected-warning{{destination for this 'memmove' call is a pointer to lifetime-qualified type}} \
+ memmove(aip, ptr, 17); // expected-warning{{destination for this 'memmove' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
memmove(uip, ptr, 17);
- memmove(ptr, sip, 17); // expected-warning{{source of this 'memmove' call is a pointer to lifetime-qualified type}} \
+ memmove(ptr, sip, 17); // expected-warning{{source of this 'memmove' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
- memmove(ptr, wip, 17); // expected-warning{{source of this 'memmove' call is a pointer to lifetime-qualified type}} \
+ memmove(ptr, wip, 17); // expected-warning{{source of this 'memmove' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
- memmove(ptr, aip, 17); // expected-warning{{source of this 'memmove' call is a pointer to lifetime-qualified type}} \
+ memmove(ptr, aip, 17); // expected-warning{{source of this 'memmove' call is a pointer to ownership-qualified type}} \
// expected-note{{explicitly cast the pointer to silence this warning}}
memmove(ptr, uip, 17);
}
Modified: cfe/trunk/test/SemaObjC/arc-property-decl-attrs.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-property-decl-attrs.m?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-property-decl-attrs.m (original)
+++ cfe/trunk/test/SemaObjC/arc-property-decl-attrs.m Thu Jun 23 19:08:59 2011
@@ -5,7 +5,7 @@
@public
id __unsafe_unretained x;
id __weak y;
- id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing lifetime}}
+ id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}}
}
@property(strong) id x;
@property(strong) id y;
@@ -16,7 +16,7 @@
@public
id __unsafe_unretained x;
id __weak y;
- id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing lifetime}}
+ id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}}
}
@property(retain) id x;
@property(retain) id y;
@@ -27,7 +27,7 @@
@public
id __unsafe_unretained x;
id __weak y;
- id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing lifetime}}
+ id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}}
}
@property(copy) id x;
@property(copy) id y;
Modified: cfe/trunk/test/SemaObjC/arc-property-lifetime.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-property-lifetime.m?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-property-lifetime.m (original)
+++ cfe/trunk/test/SemaObjC/arc-property-lifetime.m Thu Jun 23 19:08:59 2011
@@ -5,7 +5,7 @@
@public
id __unsafe_unretained x;
id __weak y;
- id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing lifetime}}
+ id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}}
}
@property(strong) id x; // expected-note {{property declared here}}
@property(strong) id y; // expected-note {{property declared here}}
@@ -22,7 +22,7 @@
@public
id __unsafe_unretained x;
id __weak y;
- id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing lifetime}}
+ id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}}
}
@property(retain) id x; // expected-note {{property declared here}}
@property(retain) id y; // expected-note {{property declared here}}
@@ -39,7 +39,7 @@
@public
id __unsafe_unretained x;
id __weak y;
- id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing lifetime}}
+ id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}}
}
@property(copy) id x; // expected-note {{property declared here}}
@property(copy) id y; // expected-note {{property declared here}}
Modified: cfe/trunk/test/SemaObjC/arc-property.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-property.m?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-property.m (original)
+++ cfe/trunk/test/SemaObjC/arc-property.m Thu Jun 23 19:08:59 2011
@@ -33,7 +33,7 @@
@public
id __unsafe_unretained x; // should be __weak
id __strong y;
- id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing lifetime}}
+ id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}}
}
@property(weak) id x; // expected-note {{property declared here}}
@property(weak) id y; // expected-note {{property declared here}}
Modified: cfe/trunk/test/SemaObjC/arc-system-header.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-system-header.m?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-system-header.m (original)
+++ cfe/trunk/test/SemaObjC/arc-system-header.m Thu Jun 23 19:08:59 2011
@@ -24,7 +24,7 @@
// workaround expected-note {{marked unavailable here}}
void test5(struct Test5 *p) {
- p->field = 0; // expected-error {{'field' is unavailable: this system field has retaining lifetime}}
+ p->field = 0; // expected-error {{'field' is unavailable: this system field has retaining ownership}}
}
id test6() {
Modified: cfe/trunk/test/SemaObjC/arc-type-conversion.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-type-conversion.m?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-type-conversion.m (original)
+++ cfe/trunk/test/SemaObjC/arc-type-conversion.m Thu Jun 23 19:08:59 2011
@@ -6,7 +6,7 @@
(void)(int*)arg; // expected-error {{cast of an Objective-C pointer to 'int *' is disallowed with ARC}}
(void)(id)arg;
(void)(__autoreleasing id*)arg; // expected-error {{cast of an Objective-C pointer to '__autoreleasing id *' is disallowed with ARC}}
- (void)(id*)arg; // expected-error {{pointer to non-const type 'id' with no explicit lifetime}} expected-error {{cast of an Objective-C pointer to '__autoreleasing id *' is disallowed with ARC}}
+ (void)(id*)arg; // expected-error {{pointer to non-const type 'id' with no explicit ownership}} expected-error {{cast of an Objective-C pointer to '__autoreleasing id *' is disallowed with ARC}}
(void)(__autoreleasing id**)voidp_val;
(void)(void*)voidp_val;
Modified: cfe/trunk/test/SemaObjC/arc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc.m?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc.m (original)
+++ cfe/trunk/test/SemaObjC/arc.m Thu Jun 23 19:08:59 2011
@@ -329,7 +329,7 @@
}
void test15() {
- __block __autoreleasing id x; // expected-error {{__block variables cannot have __autoreleasing lifetime}}
+ __block __autoreleasing id x; // expected-error {{__block variables cannot have __autoreleasing ownership}}
}
struct Test16;
@@ -397,16 +397,16 @@
}
// rdar://problem/8951453
-static __thread id test20_implicit; // expected-error {{thread-local variable has non-trivial lifetime: type is '__strong id'}}
-static __thread __strong id test20_strong; // expected-error {{thread-local variable has non-trivial lifetime: type is '__strong id'}}
-static __thread __weak id test20_weak; // expected-error {{thread-local variable has non-trivial lifetime: type is '__weak id'}}
-static __thread __autoreleasing id test20_autoreleasing; // expected-error {{thread-local variable has non-trivial lifetime: type is '__autoreleasing id'}} expected-error {{global variables cannot have __autoreleasing lifetime}}
+static __thread id test20_implicit; // expected-error {{thread-local variable has non-trivial ownership: type is '__strong id'}}
+static __thread __strong id test20_strong; // expected-error {{thread-local variable has non-trivial ownership: type is '__strong id'}}
+static __thread __weak id test20_weak; // expected-error {{thread-local variable has non-trivial ownership: type is '__weak id'}}
+static __thread __autoreleasing id test20_autoreleasing; // expected-error {{thread-local variable has non-trivial ownership: type is '__autoreleasing id'}} expected-error {{global variables cannot have __autoreleasing ownership}}
static __thread __unsafe_unretained id test20_unsafe;
void test20(void) {
- static __thread id test20_implicit; // expected-error {{thread-local variable has non-trivial lifetime: type is '__strong id'}}
- static __thread __strong id test20_strong; // expected-error {{thread-local variable has non-trivial lifetime: type is '__strong id'}}
- static __thread __weak id test20_weak; // expected-error {{thread-local variable has non-trivial lifetime: type is '__weak id'}}
- static __thread __autoreleasing id test20_autoreleasing; // expected-error {{thread-local variable has non-trivial lifetime: type is '__autoreleasing id'}} expected-error {{global variables cannot have __autoreleasing lifetime}}
+ static __thread id test20_implicit; // expected-error {{thread-local variable has non-trivial ownership: type is '__strong id'}}
+ static __thread __strong id test20_strong; // expected-error {{thread-local variable has non-trivial ownership: type is '__strong id'}}
+ static __thread __weak id test20_weak; // expected-error {{thread-local variable has non-trivial ownership: type is '__weak id'}}
+ static __thread __autoreleasing id test20_autoreleasing; // expected-error {{thread-local variable has non-trivial ownership: type is '__autoreleasing id'}} expected-error {{global variables cannot have __autoreleasing ownership}}
static __thread __unsafe_unretained id test20_unsafe;
}
@@ -415,7 +415,7 @@
return (_Bool)obj;
}
-// Check casting w/ lifetime qualifiers.
+// Check casting w/ ownership qualifiers.
void test21() {
__strong id *sip;
(void)(__weak id *)sip; // expected-error{{casting '__strong id *' to type '__weak id *' changes retain/release properties of pointer}}
@@ -425,7 +425,7 @@
}
// rdar://problem/9340462
-void test22(id x[]) { // expected-error {{must explicitly describe intended lifetime of an object array parameter}}
+void test22(id x[]) { // expected-error {{must explicitly describe intended ownership of an object array parameter}}
}
// rdar://problem/9400219
@@ -464,7 +464,7 @@
void test26(id y) {
extern id test26_var1;
- __sync_swap(&test26_var1, 0, y); // expected-error {{cannot perform atomic operation on a pointer to type '__strong id': type has non-trivial lifetime}}
+ __sync_swap(&test26_var1, 0, y); // expected-error {{cannot perform atomic operation on a pointer to type '__strong id': type has non-trivial ownership}}
extern __unsafe_unretained id test26_var2;
__sync_swap(&test26_var2, 0, y);
Modified: cfe/trunk/test/SemaObjCXX/arc-non-pod.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/arc-non-pod.mm?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/arc-non-pod.mm (original)
+++ cfe/trunk/test/SemaObjCXX/arc-non-pod.mm Thu Jun 23 19:08:59 2011
@@ -21,7 +21,7 @@
}
// Don't complain if the Objective-C pointer type was explicitly given
-// no lifetime.
+// no ownership.
struct HasObjectMember3 {
__unsafe_unretained id x[3][2];
};
@@ -107,7 +107,7 @@
@interface Crufty {
union {
struct {
- id object; // expected-note{{has __strong lifetime}}
+ id object; // expected-note{{has __strong ownership}}
} an_object; // expected-error{{union member 'an_object' has a non-trivial copy constructor}}
void *ptr;
} storage;
Modified: cfe/trunk/test/SemaObjCXX/arc-object-init-destroy.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/arc-object-init-destroy.mm?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/arc-object-init-destroy.mm (original)
+++ cfe/trunk/test/SemaObjCXX/arc-object-init-destroy.mm Thu Jun 23 19:08:59 2011
@@ -37,7 +37,7 @@
// ... but not for arrays.
typedef id id_array[2][3];
- (void)new id_array; // expected-error{{'new' cannot allocate an array of 'id' with no explicit lifetime}}
+ (void)new id_array; // expected-error{{'new' cannot allocate an array of 'id' with no explicit ownership}}
typedef __strong id strong_id_array[2][3];
typedef __strong id strong_id_3[3];
Modified: cfe/trunk/test/SemaObjCXX/arc-overloading.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/arc-overloading.mm?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/arc-overloading.mm (original)
+++ cfe/trunk/test/SemaObjCXX/arc-overloading.mm Thu Jun 23 19:08:59 2011
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -verify -fblocks %s
-// Simple lifetime conversions + diagnostics.
-int &f0(id __strong const *); // expected-note{{candidate function not viable: 1st argument ('__weak id *') has __weak lifetime, but parameter has __strong lifetime}}
+// Simple ownership conversions + diagnostics.
+int &f0(id __strong const *); // expected-note{{candidate function not viable: 1st argument ('__weak id *') has __weak ownership, but parameter has __strong ownership}}
void test_f0() {
id __strong *sip;
@@ -46,7 +46,7 @@
id __autoreleasing *aip;
id __unsafe_unretained *uip;
- // Prefer non-lifetime conversions to lifetime conversions.
+ // Prefer non-ownership conversions to ownership conversions.
int &ir1 = f2(sip);
int &ir2 = f2(csip);
float &fr1 = f2(aip);
@@ -55,7 +55,7 @@
}
// Writeback conversion
-int &f3(id __autoreleasing *); // expected-note{{candidate function not viable: 1st argument ('__unsafe_unretained id *') has __unsafe_unretained lifetime, but parameter has __autoreleasing lifetime}}
+int &f3(id __autoreleasing *); // expected-note{{candidate function not viable: 1st argument ('__unsafe_unretained id *') has __unsafe_unretained ownership, but parameter has __autoreleasing ownership}}
void test_f3() {
id __strong *sip;
@@ -116,9 +116,9 @@
}
// Reference binding
-void f7(__strong id&); // expected-note{{candidate function not viable: 1st argument ('__weak id') has __weak lifetime, but parameter has __strong lifetime}} \
- // expected-note{{candidate function not viable: 1st argument ('__autoreleasing id') has __autoreleasing lifetime, but parameter has __strong lifetime}} \
- // expected-note{{candidate function not viable: 1st argument ('__unsafe_unretained id') has __unsafe_unretained lifetime, but parameter has __strong lifetime}}
+void f7(__strong id&); // expected-note{{candidate function not viable: 1st argument ('__weak id') has __weak ownership, but parameter has __strong ownership}} \
+ // expected-note{{candidate function not viable: 1st argument ('__autoreleasing id') has __autoreleasing ownership, but parameter has __strong ownership}} \
+ // expected-note{{candidate function not viable: 1st argument ('__unsafe_unretained id') has __unsafe_unretained ownership, but parameter has __strong ownership}}
void test_f7() {
__strong id strong_id;
Modified: cfe/trunk/test/SemaObjCXX/arc-system-header.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/arc-system-header.mm?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/arc-system-header.mm (original)
+++ cfe/trunk/test/SemaObjCXX/arc-system-header.mm Thu Jun 23 19:08:59 2011
@@ -4,7 +4,7 @@
void f(A* a) {
a->data.void_ptr = 0;
- a->data.a_b.b = 0; // expected-error{{'a_b' is unavailable: this system field has retaining lifetime}}
+ a->data.a_b.b = 0; // expected-error{{'a_b' is unavailable: this system field has retaining ownership}}
}
// Silly location below
// expected-note{{declaration has been explicitly marked unavailable here}}
Modified: cfe/trunk/test/SemaObjCXX/arc-type-conversion.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/arc-type-conversion.mm?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/arc-type-conversion.mm (original)
+++ cfe/trunk/test/SemaObjCXX/arc-type-conversion.mm Thu Jun 23 19:08:59 2011
@@ -7,7 +7,7 @@
(void)(int*)arg; // expected-error {{cast of an Objective-C pointer to 'int *' is disallowed with ARC}}
(void)(id)arg;
(void)(__autoreleasing id*)arg; // expected-error{{C-style cast from 'id' to '__autoreleasing id *' casts away qualifiers}}
- (void)(id*)arg; // expected-error {{pointer to non-const type 'id' with no explicit lifetime}} \
+ (void)(id*)arg; // expected-error {{pointer to non-const type 'id' with no explicit ownership}} \
// expected-error{{C-style cast from 'id' to '__autoreleasing id *' casts away qualifiers}}
(void)(__autoreleasing id**)voidp_val;
@@ -43,7 +43,7 @@
(void)static_cast<id>(arg);
(void)static_cast<__autoreleasing id*>(arg); // expected-error{{cannot cast from type 'id' to pointer type '__autoreleasing id *'}}
(void)static_cast<id*>(arg); // expected-error {{cannot cast from type 'id' to pointer type '__autoreleasing id *'}} \
- // expected-error{{pointer to non-const type 'id' with no explicit lifetime}}
+ // expected-error{{pointer to non-const type 'id' with no explicit ownership}}
(void)static_cast<__autoreleasing id**>(voidp_val);
(void)static_cast<void*>(voidp_val);
@@ -57,8 +57,8 @@
void test_const_cast(__strong id *sip, __weak id *wip,
const __strong id *csip, __weak const id *cwip) {
- // Cannot use const_cast to cast between lifetime qualifications or
- // add/remove lifetime qualifications.
+ // Cannot use const_cast to cast between ownership qualifications or
+ // add/remove ownership qualifications.
(void)const_cast<__strong id *>(wip); // expected-error{{is not allowed}}
(void)const_cast<__weak id *>(sip); // expected-error{{is not allowed}}
@@ -69,7 +69,7 @@
void test_reinterpret_cast(__strong id *sip, __weak id *wip,
const __strong id *csip, __weak const id *cwip) {
- // Okay to reinterpret_cast to add/remove/change lifetime
+ // Okay to reinterpret_cast to add/remove/change ownership
// qualifications.
(void)reinterpret_cast<__strong id *>(wip);
(void)reinterpret_cast<__weak id *>(sip);
@@ -83,7 +83,7 @@
void test_cstyle_cast(__strong id *sip, __weak id *wip,
const __strong id *csip, __weak const id *cwip) {
- // C-style casts aren't allowed to change Objective-C lifetime
+ // C-style casts aren't allowed to change Objective-C ownership
// qualifiers (beyond what the normal implicit conversion allows).
(void)(__strong id *)wip; // expected-error{{C-style cast from '__weak id *' to '__strong id *' casts away qualifiers}}
@@ -103,7 +103,7 @@
void test_functional_cast(__strong id *sip, __weak id *wip,
__autoreleasing id *aip) {
- // Functional casts aren't allowed to change Objective-C lifetime
+ // Functional casts aren't allowed to change Objective-C ownership
// qualifiers (beyond what the normal implicit conversion allows).
typedef __strong id *strong_id_pointer;
Modified: cfe/trunk/test/SemaObjCXX/gc-attributes.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/gc-attributes.mm?rev=133779&r1=133778&r2=133779&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/gc-attributes.mm (original)
+++ cfe/trunk/test/SemaObjCXX/gc-attributes.mm Thu Jun 23 19:08:59 2011
@@ -3,7 +3,7 @@
@interface A
@end
-void f0(__strong A**); // expected-note{{candidate function not viable: 1st argument ('A *__weak *') has __weak lifetime, but parameter has __strong lifetime}}
+void f0(__strong A**); // expected-note{{candidate function not viable: 1st argument ('A *__weak *') has __weak ownership, but parameter has __strong ownership}}
void test_f0() {
A *a;
@@ -12,7 +12,7 @@
f0(&a2); // expected-error{{no matching function}}
}
-void f1(__weak A**); // expected-note{{candidate function not viable: 1st argument ('A *__strong *') has __strong lifetime, but parameter has __weak lifetime}}
+void f1(__weak A**); // expected-note{{candidate function not viable: 1st argument ('A *__strong *') has __strong ownership, but parameter has __weak ownership}}
void test_f1() {
A *a;
More information about the cfe-commits
mailing list