[cfe-commits] Clang change to detect and warn about unused private members
Jordy Rose
jediknil at belkadan.com
Wed May 9 15:38:57 PDT 2012
I didn't put a huge amount of effort into reviewing this, but here are a couple things I noticed...
- How about putting a "Used" bit in FieldDecl, rather than keeping a separate SetVector? It's not like iterating over all fields is that much of a cost later.
- IsRecordFullyDefined should probably use SmallPtrSetImpl, to avoid specifying a size in the function prototype. (Not that it /really/ matters, but...)
- You have an additional "NumArgs > 0" when marking a field used, and the for-loop should probably be in an else-case.
- Don't use isa<> followed by dyn_cast<>. Just put the dyn_cast<> in the condition.
Jordy
More information about the cfe-commits
mailing list