[PATCH] libclang: New functions clang_Type_getNumTemplateArguments, clang_Type_getTemplateArgument.

Dmitri Gribenko gribozavr at gmail.com
Thu Feb 27 04:38:34 PST 2014


  It is interesting that the variadic template case failed.  Could you investigate?


================
Comment at: test/Index/print-type.cpp:93
@@ +92,3 @@
+// CHECK: TemplateRef=Foo:4:8 [type=] [typekind=Invalid] [isPOD=0]
+// CHECK: FieldDecl=qux:28:29 (Definition) [type=Qux<int, char *, Foo<int> >] [typekind=Unexposed] [canonicaltype=outer::Qux<int, char *, outer::Foo<int> >] [canonicaltypekind=Record] [templateargs=] [isPOD=1]
+// CHECK: TemplateRef=Qux:12:8 [type=] [typekind=Invalid] [isPOD=0]
----------------
An empty list in the variadic template case... Is this really expected?

================
Comment at: tools/c-index-test/c-index-test.c:1272
@@ -1271,3 +1271,3 @@
           CXType T = clang_getCursorType(clang_Cursor_getArgument(cursor, i));
           if (T.kind != CXType_Invalid) {
             PrintTypeAndTypeKind(T, " [%s] [%s]");
----------------
Please print something in the invalid case as well, or print the NumArgs variable.

  [templateargs/3=[Int][Int]]

Maybe something like that.


http://llvm-reviews.chandlerc.com/D1688



More information about the cfe-commits mailing list