From: Jordan Rose Date: Thu, 11 Oct 2012 16:02:02 +0000 (+0000) Subject: ObjCMethodDecl::findPropertyDecl: bail out early if not an instance method. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50d2b268d7a49719fe9dae89195ff809c4572dbf;p=clang ObjCMethodDecl::findPropertyDecl: bail out early if not an instance method. Currently, Objective-C does not support class properties, even though it allows calling class methods with dot syntax. No intended functionality change; purely optimization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165716 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index f4a0bdf38b..2dbb353af3 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -904,7 +904,7 @@ ObjCMethodDecl::findPropertyDecl(bool CheckOverrides) const { if (NumArgs > 1) return 0; - if (getMethodFamily() != OMF_None) + if (!isInstanceMethod() || getMethodFamily() != OMF_None) return 0; if (isPropertyAccessor()) {