[cfe-dev] documentation parsing

Douglas Gregor dgregor at apple.com
Thu Jun 23 09:53:29 PDT 2011


On Jun 23, 2011, at 9:40 AM, Florian Merz wrote:

> Hey everyone,
> 
> does clang throw away comments or are the retained? As far as I remeber they 
> are thrown away by the preprocessor, which would be a pitty.

Yes, that's currently what's happening.

> I'd need them to 
> be integrated into the AST and need to have them associated with a function, 
> struct or loop.
> 
> Is there any chance to do that? I'd like to parse a JML-like specification, 
> which is added to the code in the comments, just like for example doxygen is.


I would love for comments to be retained and associated with AST elements. I took a shot at doing this a while ago

	http://llvm.org/viewvc/llvm-project?view=rev&revision=74704

but it never actually got used by anything and never became "real", so I eventually ripped it out.

	- Doug



More information about the cfe-dev mailing list