[PATCH] D29967: Get class property selectors from property decl if it exists

David Herzka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 16 19:40:36 PST 2017


herzka added a comment.

Currently, `A.customGetterProperty` would be turned into `[A customGetterProperty]`, which would fail to compile because that selector isn't declared anywhere. With my fix, it does compile because it (correctly) resolves to `[A customGet]`, which does exist. Similarly, `a.customSetterProperty = 1` got turned into `[a setCustomSetterProperty:1]` (another nonexistent selector), but now becomes `[a customSet:1]`.

Here are the errors I get when I run the test without my fix:

  error: 'error' diagnostics seen but not expected:
    File /Users/herzka/dev/OSS/llvm/tools/clang/test/SemaObjC/objc-class-property.m Line 45: no setter method 'setCustomSetterProperty:' for assignment to property
    File /Users/herzka/dev/OSS/llvm/tools/clang/test/SemaObjC/objc-class-property.m Line 46: no getter method for read from property
  2 errors generated.


https://reviews.llvm.org/D29967





More information about the cfe-commits mailing list