[index] Fixes for locations and relations in Objective C categories and getters/setters

- Add entries for protocols on categories
- Add relation between categories and class they extend
- Add relation between getters/setters and their corresponding property
- Use category name location as the location of category decls/defs if it has one

llvm-svn: 285120
diff --git a/clang/lib/Index/IndexSymbol.cpp b/clang/lib/Index/IndexSymbol.cpp
index 13a8452..65f5241 100644
--- a/clang/lib/Index/IndexSymbol.cpp
+++ b/clang/lib/Index/IndexSymbol.cpp
@@ -262,6 +262,8 @@
   APPLY_FOR_ROLE(RelationOverrideOf);
   APPLY_FOR_ROLE(RelationReceivedBy);
   APPLY_FOR_ROLE(RelationCalledBy);
+  APPLY_FOR_ROLE(RelationExtendedBy);
+  APPLY_FOR_ROLE(RelationAccessorOf);
 
 #undef APPLY_FOR_ROLE
 }
@@ -288,6 +290,8 @@
     case SymbolRole::RelationOverrideOf: OS << "RelOver"; break;
     case SymbolRole::RelationReceivedBy: OS << "RelRec"; break;
     case SymbolRole::RelationCalledBy: OS << "RelCall"; break;
+    case SymbolRole::RelationExtendedBy: OS << "RelExt"; break;
+    case SymbolRole::RelationAccessorOf: OS << "RelAcc"; break;
     }
   });
 }