15-Mar-2013 10:47, Walter Bright пишет:
On 3/14/2013 11:36 PM, Dmitry Olshansky wrote:
15-Mar-2013 01:58, Andrei Alexandrescu пишет:
On 3/14/13 4:37 PM, Dmitry Olshansky wrote:
Point taken. That doesn't detract us from:
a) fixing issues with -cov
Yes please (are there bugzilla entries etc)?
template powerup(T) //usable as template mixin too
{
//imagine more constraints
static if(size_t.sizeof == 4)
alias bleh = blah;
else
alias bleh = oldBlah;
//...
}
Now first mixin template don't get counted at all (even code within).
Then declarations are ignored and you'll never know which ones were
ever looked at.
-cov only counts executable lines. The above are not executable - I
don't see any way to make them work with -cov.
The information can be trivially collected during semantic analysis of
declarations.
How to merge this compile-time info with run-time one as in -cov is a
another question. I'd try outputting some table into object file
(special section etc.) and then -cov would use it to mark non-executable
code.
--
Dmitry Olshansky