[cfe-commits] [PATCH] Add brief documentation comments to code completion results

Douglas Gregor dgregor at apple.com
Thu Jun 28 21:29:44 PDT 2012


Hi Dmitri,

On Jun 28, 2012, at 9:33 AM, Dmitri Gribenko wrote:

> Hello,
> 
> The attached patch adds extracted brief comments to code completion
> results as informative chunks.  I am not sure that this is the right
> approach.  Maybe a new chunk type is needed.
> 
> Please review.

The "chunks" themselves are typically meant to be rendered as part of the completion text, The brief comments aren't really the same thing, though; they're a separate bit of documentation that would typically be rendered elsewhere. I suggest actually adding an API function

CINDEX_LINKAGE CXString clang_getCompletionBriefComment(CXCompletionString completion_string)

to extract the comment. Given that extracting these comments isn't free, I recommend adding a bit to CXCodeComplete_Flags to turn on the ability to extract comments.

	- Doug



More information about the cfe-commits mailing list