Refinement to my previous patch for
objc_returns_inner_pointer on properties. // rdar://14990439


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191016 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index d9e9972..8a2d126 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -4145,6 +4145,11 @@
 
 static void handleObjCReturnsInnerPointerAttr(Sema &S, Decl *D,
                                               const AttributeList &attr) {
+  enum {
+    EP_ObjCMethod = 1,
+    EP_ObjCProperty
+  };
+  
   SourceLocation loc = attr.getLoc();
   QualType resultType;
   
@@ -4167,7 +4172,8 @@
       (!resultType->isPointerType() || resultType->isObjCRetainableType())) {
     S.Diag(D->getLocStart(), diag::warn_ns_attribute_wrong_return_type)
       << SourceRange(loc)
-    << attr.getName() << (method ? /*method*/ 1 : /*property*/ 2) << /*non-retainable pointer*/ 2;
+    << attr.getName() << (method ? EP_ObjCMethod : EP_ObjCProperty)
+    << /*non-retainable pointer*/ 2;
 
     // Drop the attribute.
     return;