aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-08-28 22:26:21 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-08-28 22:26:21 +0000
commita23bd4cec36d7f29065418f84ef48395fcbe6254 (patch)
tree7977c7af49fbf8d271946464a9f22b4c7067aaa6 /lib/Sema/SemaDeclAttr.cpp
parent1588cb8e137fa7c8f12e5a6fd1b64eee05a7e916 (diff)
objective-C arc: ns_returns_retained is a type attribute in ARC,
and when used in property type declaration, is handled as type attribute. Do not issue the warning when declaraing the property. // rdar://12173491 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162801 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--lib/Sema/SemaDeclAttr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index caa7b2f65a..fcfa574d59 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -3878,11 +3878,11 @@ static void handleNSReturnsRetainedAttr(Sema &S, Decl *D,
if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D))
returnType = MD->getResultType();
- else if (ObjCPropertyDecl *PD = dyn_cast<ObjCPropertyDecl>(D))
- returnType = PD->getType();
else if (S.getLangOpts().ObjCAutoRefCount && hasDeclarator(D) &&
(Attr.getKind() == AttributeList::AT_NSReturnsRetained))
return; // ignore: was handled as a type attribute
+ else if (ObjCPropertyDecl *PD = dyn_cast<ObjCPropertyDecl>(D))
+ returnType = PD->getType();
else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
returnType = FD->getResultType();
else {