[cfe-commits] [patch][pr11550] Extend the unused variable warning

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Sun Dec 25 06:03:05 PST 2011


> What about all of the objects whose constructor and destructor *are* the
> desired uses? It's not hard for me to imagine ones with a constructor
> alone that is the only desired side-effect....

The warning still checks for those. The destructor check is unchanged.
The constructor check know also checks that the constructor is used, so
if the code can depend on its side effects, there is no warning.

On the firefox build the only case that is borderline with a false
positive is a template specialization where a variable is unused, but is
used in the general template.

> 
>     Cheers,
>     Rafael

Cheers,
Rafael



More information about the cfe-commits mailing list