[PATCH] D49066: [libclang 2/8] Add support for ObjCTypeParam
Phabricator via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 2 21:03:11 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rC338807: [libclang 2/8] Add support for ObjCTypeParam (authored by mwu, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D49066
Files:
include/clang-c/Index.h
test/Index/print-type.m
tools/libclang/CXType.cpp
Index: test/Index/print-type.m
===================================================================
--- test/Index/print-type.m
+++ test/Index/print-type.m
@@ -7,6 +7,10 @@
@property (class) int classProp;
@end
+ at interface Bar<SomeType> : Foo
+-(SomeType)generic;
+ at end
+
// RUN: c-index-test -test-print-type %s | FileCheck %s
// CHECK: ObjCPropertyDecl=x:2:25 [readonly,] [type=id] [typekind=ObjCId] [canonicaltype=id] [canonicaltypekind=ObjCObjectPointer] [isPOD=1]
// CHECK: ObjCInstanceMethodDecl=mymethod:3:8 [type=] [typekind=Invalid] [resulttype=int] [resulttypekind=Int] [isPOD=0]
@@ -17,3 +21,4 @@
// CHECK: ParmDecl=j:5:49 (Definition) [Out,] [type=short *] [typekind=Pointer] [isPOD=1] [pointeetype=short] [pointeekind=Short]
// CHECK: ParmDecl=p:6:36 (Definition) [type=__kindof Foo *] [typekind=ObjCObjectPointer] [canonicaltype=__kindof Foo *] [canonicaltypekind=ObjCObjectPointer] [basetype=Foo] [basekind=ObjCInterface] [isPOD=1] [pointeetype=Foo] [pointeekind=ObjCInterface]
// CHECK: ObjCPropertyDecl=classProp:7:23 [class,] [type=int] [typekind=Int] [isPOD=1]
+// CHECK: ObjCInstanceMethodDecl=generic:11:12 [type=] [typekind=Invalid] [resulttype=SomeType] [resulttypekind=ObjCTypeParam] [isPOD=0]
Index: tools/libclang/CXType.cpp
===================================================================
--- tools/libclang/CXType.cpp
+++ tools/libclang/CXType.cpp
@@ -100,6 +100,7 @@
TKCASE(ObjCInterface);
TKCASE(ObjCObject);
TKCASE(ObjCObjectPointer);
+ TKCASE(ObjCTypeParam);
TKCASE(FunctionNoProto);
TKCASE(FunctionProto);
TKCASE(ConstantArray);
@@ -578,6 +579,7 @@
TKIND(ObjCInterface);
TKIND(ObjCObject);
TKIND(ObjCObjectPointer);
+ TKIND(ObjCTypeParam);
TKIND(FunctionNoProto);
TKIND(FunctionProto);
TKIND(ConstantArray);
Index: include/clang-c/Index.h
===================================================================
--- include/clang-c/Index.h
+++ include/clang-c/Index.h
@@ -3267,7 +3267,8 @@
CXType_OCLQueue = 159,
CXType_OCLReserveID = 160,
- CXType_ObjCObject = 161
+ CXType_ObjCObject = 161,
+ CXType_ObjCTypeParam = 162
};
/**
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49066.158908.patch
Type: text/x-patch
Size: 2150 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180803/9189feda/attachment-0001.bin>
More information about the cfe-commits
mailing list