Add clang_getCursorType() support for @property declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106451 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Index/print-typekind.m b/test/Index/print-typekind.m
new file mode 100644
index 0000000..62cbb70
--- /dev/null
+++ b/test/Index/print-typekind.m
@@ -0,0 +1,7 @@
+@interface Foo
+@property (readonly) id x;
+@end
+
+// RUN: c-index-test -test-print-typekind %s | FileCheck %s
+// CHECK: ObjCPropertyDecl=x:2:25 typekind=Typedef [canonical=ObjCObjectPointer]
+
diff --git a/tools/libclang/CXTypes.cpp b/tools/libclang/CXTypes.cpp
index 777afb9..ae756c7 100644
--- a/tools/libclang/CXTypes.cpp
+++ b/tools/libclang/CXTypes.cpp
@@ -116,6 +116,8 @@
return MakeCXType(QualType(ID->getTypeForDecl(), 0), AU);
if (ValueDecl *VD = dyn_cast<ValueDecl>(D))
return MakeCXType(VD->getType(), AU);
+ if (ObjCPropertyDecl *PD = dyn_cast<ObjCPropertyDecl>(D))
+ return MakeCXType(PD->getType(), AU);
return MakeCXType(QualType(), AU);
}