DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

Adam D. Ruppe destructionator at gmail.com
Wed Jun 12 10:40:47 PDT 2013


On Wednesday, 12 June 2013 at 17:31:27 UTC, bearophile wrote:
>>We do not use Ddoc, because most important information about 
>>functions are not included.
> - In- / Out-Constrains

These are pretty easy to add to dmd. In doc.c's 
FuncDelaration::toDocBuffer you can throw in something like this:
             if(frequire)
                 buf->writestring(frequire->toChars());
             if(fensure)
                 buf->writestring(fensure->toChars());

with a little cleanup and a wrapper macro and I think that would 
be good.

> - Exceptional Cases aka Throws<

No easy way to do this automatically though because the compiler 
doesn't even know what a function can throw. You'd just have to 
do it manually.


More information about the Digitalmars-d-announce mailing list