diff options
author | John McCall <rjmccall@apple.com> | 2015-10-28 05:03:19 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2015-10-28 05:03:19 +0000 |
commit | c6af8c606dae9a9b728d5099d5964ea6540dc22c (patch) | |
tree | 0a19128c0f58cc451454838159b232968eb359e5 /clang/lib/Sema/SemaDecl.cpp | |
parent | 9b1534df9da6695fde3d639e8ee3b9a7cf36b0a4 (diff) | |
download | bcm5719-llvm-c6af8c606dae9a9b728d5099d5964ea6540dc22c.tar.gz bcm5719-llvm-c6af8c606dae9a9b728d5099d5964ea6540dc22c.zip |
Refine r251469 to give better (and more localizable) diagnostics
for all the reasons that ARC makes things implicitly unavailable.
llvm-svn: 251496
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index f9e75893bf3..43fe9947840 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -13076,9 +13076,8 @@ bool Sema::CheckNontrivialField(FieldDecl *FD) { SourceLocation Loc = FD->getLocation(); if (getSourceManager().isInSystemHeader(Loc)) { if (!FD->hasAttr<UnavailableAttr>()) - FD->addAttr(UnavailableAttr::CreateImplicit(Context, - "this system field has retaining ownership", - Loc)); + FD->addAttr(UnavailableAttr::CreateImplicit(Context, "", + UnavailableAttr::IR_ARCFieldWithOwnership, Loc)); return false; } } @@ -13447,9 +13446,8 @@ void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, SourceLocation loc = FD->getLocation(); if (getSourceManager().isInSystemHeader(loc)) { if (!FD->hasAttr<UnavailableAttr>()) { - FD->addAttr(UnavailableAttr::CreateImplicit(Context, - "this system field has retaining ownership", - loc)); + FD->addAttr(UnavailableAttr::CreateImplicit(Context, "", + UnavailableAttr::IR_ARCFieldWithOwnership, loc)); } } else { Diag(FD->getLocation(), diag::err_arc_objc_object_in_tag) |