Add clang_getCursorType() support for @property declarations.
llvm-svn: 106451
This commit is contained in:
parent
466b31e900
commit
d34da45a83
|
@ -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]
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue