If the address of a field is taken as a pointer to member, we should
not warn that the field is not used.
Normaly, yse of fields are done from MemberExpr, but in case of pointer to
member, it is in a DeclRefExpr
Differential Revision: http://reviews.llvm.org/D20054
llvm-svn: 268895
fields in the class. This allows a better checking of member intiailizers and
in class initializers in regards to initialization ordering.
For instance, this code will now produce warnings:
class A {
int x;
int y;
A() : x(y) {} // y is initialized after x, warn here
A(int): y(x) {} // default initialization of leaves x uninitialized, warn here
};
Several test cases were updated with -Wno-uninitialized to silence this warning.
llvm-svn: 191068
for side-effects. Instead, check for side-effects after performing
initialization. Doing so also removes some strange corner cases and differences
between in-class initialization and constructor initialization.
llvm-svn: 161449