diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-06-05 21:14:46 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-06-05 21:14:46 +0000 |
commit | 1ea6744b3da4b052acb7ed67e717cd70df5b5977 (patch) | |
tree | 583e2f3f728025bccb9a1817231f86cbde65936c /lib/Sema/SemaDecl.cpp | |
parent | d6f6569bf693da3f8efd8ce7ae93fbbfccf09753 (diff) |
objective-c: merge deprecated/unavailable attributes to
the overriding deprecated/unavailable method.
// rdar://11475360
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index d194d9f100..ec1f460f53 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/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(), |