summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-12-03 23:37:08 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-12-03 23:37:08 +0000
commitecbbb6e9bae188e9026ec3b41554dde054c79f7b (patch)
tree3472abeb2e5cb695e3e8498a9354a8fc826cb490 /clang/lib/AST/DeclObjC.cpp
parentf8af778e1f8e83522cd6c3c7cb85ea97e4de5db1 (diff)
downloadbcm5719-llvm-ecbbb6e9bae188e9026ec3b41554dde054c79f7b.tar.gz
bcm5719-llvm-ecbbb6e9bae188e9026ec3b41554dde054c79f7b.zip
Diagnose when accessing property in a class method and
no property accessor class method to be found, instead of crashing in IRGen. // rdar://8703553 llvm-svn: 120855
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r--clang/lib/AST/DeclObjC.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index ea8fd4ae89d..45f5188d404 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -311,14 +311,16 @@ ObjCMethodDecl *ObjCInterfaceDecl::lookupMethod(Selector Sel,
return NULL;
}
-ObjCMethodDecl *ObjCInterfaceDecl::lookupPrivateInstanceMethod(
- const Selector &Sel) {
+ObjCMethodDecl *ObjCInterfaceDecl::lookupPrivateMethod(
+ const Selector &Sel,
+ bool Instance) {
ObjCMethodDecl *Method = 0;
if (ObjCImplementationDecl *ImpDecl = getImplementation())
- Method = ImpDecl->getInstanceMethod(Sel);
+ Method = Instance ? ImpDecl->getInstanceMethod(Sel)
+ : ImpDecl->getClassMethod(Sel);
if (!Method && getSuperClass())
- return getSuperClass()->lookupPrivateInstanceMethod(Sel);
+ return getSuperClass()->lookupPrivateMethod(Sel, Instance);
return Method;
}
OpenPOWER on IntegriCloud