diff options
author | Nico Weber <nicolasweber@gmx.de> | 2015-03-02 01:12:28 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2015-03-02 01:12:28 +0000 |
commit | f6098392441f6a75c4cba609f0d31f6fff7b196d (patch) | |
tree | 961e7d6cba17b67c6c40e3162fed2d0ea751119c /clang | |
parent | 43e7f96f647112116c124f4574e46154a990448b (diff) | |
download | bcm5719-llvm-f6098392441f6a75c4cba609f0d31f6fff7b196d.tar.gz bcm5719-llvm-f6098392441f6a75c4cba609f0d31f6fff7b196d.zip |
Fix ObjCInterfaceDecl::getCategoryMethod() and give it a caller. No behavior change.
llvm-svn: 230928
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/AST/DeclObjC.h | 4 | ||||
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/clang/include/clang/AST/DeclObjC.h b/clang/include/clang/AST/DeclObjC.h index 97ce132a762..3c24d05dc5b 100644 --- a/clang/include/clang/AST/DeclObjC.h +++ b/clang/include/clang/AST/DeclObjC.h @@ -820,8 +820,8 @@ public: ObjCMethodDecl *getCategoryInstanceMethod(Selector Sel) const; ObjCMethodDecl *getCategoryClassMethod(Selector Sel) const; ObjCMethodDecl *getCategoryMethod(Selector Sel, bool isInstance) const { - return isInstance ? getInstanceMethod(Sel) - : getClassMethod(Sel); + return isInstance ? getCategoryInstanceMethod(Sel) + : getCategoryClassMethod(Sel); } typedef ObjCProtocolList::iterator protocol_iterator; diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index 6e7478474d6..77995b5261f 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -616,8 +616,7 @@ ObjCMethodDecl *ObjCInterfaceDecl::lookupPrivateMethod( // Look through local category implementations associated with the class. if (!Method) - Method = Instance ? getCategoryInstanceMethod(Sel) - : getCategoryClassMethod(Sel); + Method = getCategoryMethod(Sel, Instance); // Before we give up, check if the selector is an instance method. // But only in the root. This matches gcc's behavior and what the |