Add clang_getCursorType() support for @property declarations.

llvm-svn: 106451
This commit is contained in:
Ted Kremenek 2010-06-21 19:41:40 +00:00
parent 466b31e900
commit d34da45a83
2 changed files with 9 additions and 0 deletions

View File

@ -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]

View File

@ -116,6 +116,8 @@ CXType clang_getCursorType(CXCursor C) {
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);
}