[PATCH] clang-c: Add clang_getTypeSpelling()

Argyrios Kyrtzidis akyrtzi at gmail.com
Thu Feb 14 14:00:39 PST 2013


On Feb 14, 2013, at 1:10 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:

> Comment at: include/clang-c/Index.h:2698-2700
> @@ -2697,1 +2697,5 @@
> /**
> + * \brief Retrieve the spelling of a given CXType.
> + * \returns the spelling of the type. This string must be freed
> + * via a call to \c clang_disposeString().
> + */
> ----------------

Please also document that if the CXType is null/invalid the return value will be an empty string.

One could argue that maybe it should return a null string in such a case but I vote for consistency with clang_getCursorSpelling.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130214/9e396b9f/attachment.html>


More information about the cfe-commits mailing list