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 | 3da28f80e388de2520433066d3db32b3460bb885 (patch) | |
tree | 84a2d051e6ab3794f2a7ce7c7ee505f5552ca1a1 /clang/lib | |
parent | 4544606c71a7e70751389de8440c8df0d431733a (diff) | |
download | bcm5719-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.cpp | 7 |
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(), |