]> granicus.if.org Git - clang/commitdiff
ObjCMethodDecl::findPropertyDecl: bail out early if not an instance method.
authorJordan Rose <jordan_rose@apple.com>
Thu, 11 Oct 2012 16:02:02 +0000 (16:02 +0000)
committerJordan Rose <jordan_rose@apple.com>
Thu, 11 Oct 2012 16:02:02 +0000 (16:02 +0000)
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

lib/AST/DeclObjC.cpp

index f4a0bdf38bebcfafa52f340e3b7dba9caa1320a4..2dbb353af37762da425ba2764f554de41dbcef3c 100644 (file)
@@ -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()) {