[cfe-commits] Clang change to detect and warn about unused private members
Jordan Rose
jediknil at belkadan.com
Thu May 10 15:37:42 PDT 2012
On May 10, 2012, at 18:12, Daniel Jasper wrote:
> Ok, I now reuse Sema::RecordDeclSetTy.
>
> As for putting a bit into FieldDecl as opposed to the UnusedPrivateField SetVector: It seems like FieldDecl is carefully crafted for size. Just adding another bit for this use case doesn't seem right.
>
> Please find the new version attached.
CachedFieldIndex is just the index of the field in the record; there's no way that'll reach 2^31 anyway. (For comparison, C++11 [implimits] suggests a minimum of 4096 members.)
Also, it looks like Decl already has an isUsed() predicate. Are we already marking FieldDecls this way?
More information about the cfe-commits
mailing list