summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-06-05 21:14:46 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-06-05 21:14:46 +0000
commit3da28f80e388de2520433066d3db32b3460bb885 (patch)
tree84a2d051e6ab3794f2a7ce7c7ee505f5552ca1a1 /clang/lib
parent4544606c71a7e70751389de8440c8df0d431733a (diff)
downloadbcm5719-llvm-3da28f80e388de2520433066d3db32b3460bb885.tar.gz
bcm5719-llvm-3da28f80e388de2520433066d3db32b3460bb885.zip
objective-c: merge deprecated/unavailable attributes to
the overriding deprecated/unavailable method. // rdar://11475360 llvm-svn: 158022
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index d194d9f1006..ec1f460f53f 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -2240,12 +2240,9 @@ bool Sema::MergeCompatibleFunctionDecls(FunctionDecl *New, FunctionDecl *Old,
void Sema::mergeObjCMethodDecls(ObjCMethodDecl *newMethod,
ObjCMethodDecl *oldMethod) {
- // We don't want to merge unavailable and deprecated attributes
- // except from interface to implementation.
- bool mergeDeprecation = isa<ObjCImplDecl>(newMethod->getDeclContext());
- // Merge the attributes.
- mergeDeclAttributes(newMethod, oldMethod, mergeDeprecation);
+ // Merge the attributes, including deprecated/unavailable
+ mergeDeclAttributes(newMethod, oldMethod, /* mergeDeprecation */true);
// Merge attributes from the parameters.
ObjCMethodDecl::param_const_iterator oi = oldMethod->param_begin(),
OpenPOWER on IntegriCloud