diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-03-04 22:57:32 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-03-04 22:57:32 +0000 |
commit | 7a5830294f69089d1a17af34053bb8ab502be052 (patch) | |
tree | dd373db68a2383734b0d7d7679e9cbe94c2c96ec /clang/lib/AST/DeclObjC.cpp | |
parent | f1f45e754e142e599bbfd71eb5ca4ce737675b41 (diff) | |
download | bcm5719-llvm-7a5830294f69089d1a17af34053bb8ab502be052.tar.gz bcm5719-llvm-7a5830294f69089d1a17af34053bb8ab502be052.zip |
Objective-C. Return 0 as class of methods in protocols.
This simplifies my last patch a bit. No change in
functionality.
llvm-svn: 202906
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index ce0845681ab..94c4d5187a3 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -950,8 +950,8 @@ ObjCInterfaceDecl *ObjCMethodDecl::getClassInterface() { return CD->getClassInterface(); if (ObjCImplDecl *IMD = dyn_cast<ObjCImplDecl>(getDeclContext())) return IMD->getClassInterface(); - - assert(!isa<ObjCProtocolDecl>(getDeclContext()) && "It's a protocol method"); + if (isa<ObjCProtocolDecl>(getDeclContext())) + return 0; llvm_unreachable("unknown method context"); } |