jfb added a comment. Does this work for unions as well?
================ Comment at: test/Analysis/array-struct-region.cpp:31 + bool check() const { return this == this + 0; } + bool operator !() const { return this != this + 0; } ---------------- Is this the only way? Or do casts also disable the diagnostic? ================ Comment at: test/SemaCXX/self-comparison.cpp:78 + return S::static_field == s1.static_field; // expected-warning {{self-comparison always evaluates to true}} + return s1.array == s1.array; // expected-warning {{self-comparison always evaluates to true}} + return t.s.static_field == S::static_field; // expected-warning {{self-comparison always evaluates to true}} ---------------- `s1.array[0] == s1.array[0]`? ================ Comment at: test/SemaCXX/self-comparison.cpp:87 +}; +} // namespace member_tests ---------------- The test only has `==`. Do other operators trigger? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66045/new/ https://reviews.llvm.org/D66045 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits