Open Bug 1250096 Opened 10 years ago Updated 3 years ago

Detect unused variables of some types with non-trivial constructor/destructor

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

defect

Tracking

(Not tracked)

People

(Reporter: xidorn, Unassigned)

Details

Compilers warn unused variables, but not for those of type with non-trivial constructor or destructor. But for some types, the constructor and destructor do not actually have side effect, and thus the corresponding variable is not useful if it is not used, e.g. the smart pointers. We could probably add a new clang plugin attribute for those types, and raise error if they are defined but not used.
Product: Core → Firefox Build System
We have infrastructure for this for RefPtr; surely we could easily make it work for other types as well.
Product: Firefox Build System → Developer Infrastructure
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.