C++ static analysis

bearophile bearophileHUGS at lycos.com
Fri May 6 16:09:52 PDT 2011


Timon Gehr:

> I think it might be a
> good idea though. However, having this feature means requiring one AST compare for
> every boolean operator.

You are worried about compilation time. I think the feature we're talking about just tests the equivalence of the then/else clauses.

Clang has a --analyze switch that runs the (potentially slow) static analyser, otherwise it performs a normal amount of static test on the code. This gives you choice between a faster compilation and a slower analysis able to find some other bugs.

Bye,
bearophile


More information about the Digitalmars-d mailing list