[cfe-commits] r103809 - in /cfe/trunk: include/clang-c/Index.h test/Index/print-typekind.c tools/c-index-test/c-index-test.c tools/libclang/CMakeLists.txt tools/libclang/CXTypes.cpp tools/libclang/libclang.darwin.exports tools/libclang/libclang.exports

Douglas Gregor dgregor at apple.com
Fri May 14 14:38:16 PDT 2010

On May 14, 2010, at 2:29 PM, Ted Kremenek wrote:

> Author: kremenek
> Date: Fri May 14 16:29:26 2010
> New Revision: 103809
> URL: http://llvm.org/viewvc/llvm-project?rev=103809&view=rev
> Log:
> Add CXType and an initial set of supporting functions to libclang.  This exposes details of
> Clang's representation of the C type system to clients.  It is nowhere near complete, and will
> be expanded on demand.

Cool. Comment below.

> +/**
> + * \brief Retrieve the spelling of a given CXTypeKind.
> + */
> +CINDEX_LINKAGE CXString clang_getTypeKindSpelling(enum CXTypeKind K);

Should we allow the user to pass in a const char* for the declarator? That way, one could, e.g., take a function type, pass in the name of the function, and get a function declaration.

Also, do we need a more general way to find the other types in a compound type, e.g., to see the argument and return types of a function type?

	- Doug

More information about the cfe-commits mailing list