UnitTest = 1 << 3,
IBAnnotated = 1 << 4,
IBOutletCollection = 1 << 5,
+ GKInspectable = 1 << 6,
};
-static const unsigned SymbolSubKindBitNum = 6;
+static const unsigned SymbolSubKindBitNum = 7;
typedef unsigned SymbolSubKindSet;
/// Set of roles that are attributed to symbol occurrences.
Info.Kind = SymbolKind::InstanceProperty;
Info.Lang = SymbolLanguage::ObjC;
checkForIBOutlets(D, Info.SubKinds);
+ if (auto *Annot = D->getAttr<AnnotateAttr>()) {
+ if (Annot->getAnnotation() == "gk_inspectable")
+ Info.SubKinds |= (unsigned)SymbolSubKind::GKInspectable;
+ }
break;
case Decl::ObjCIvar:
Info.Kind = SymbolKind::Field;
APPLY_FOR_SUBKIND(UnitTest);
APPLY_FOR_SUBKIND(IBAnnotated);
APPLY_FOR_SUBKIND(IBOutletCollection);
+ APPLY_FOR_SUBKIND(GKInspectable);
#undef APPLY_FOR_SUBKIND
}
case SymbolSubKind::UnitTest: OS << "test"; break;
case SymbolSubKind::IBAnnotated: OS << "IB"; break;
case SymbolSubKind::IBOutletCollection: OS << "IBColl"; break;
+ case SymbolSubKind::GKInspectable: OS << "GKI"; break;
}
});
}
// CHECK: [[@LINE+1]]:1 | instance-method(IB)/ObjC | doIt | c:objc(cs)IBCls(im)doIt | -[IBCls doIt] | Decl,Dyn,RelChild | rel: 1
-(IBAction)doIt;
@end
+
+
+#define GKInspectable __attribute__((annotate("gk_inspectable")))
+
+@interface GKI
+// CHECK: [[@LINE+1]]:40 | instance-property(GKI)/ObjC | gkIntProp | c:objc(cs)GKI(py)gkIntProp | <no-cgname> | Decl,RelChild | rel: 1
+@property (readonly) GKInspectable int gkIntProp;
+@end