- User Since
- Dec 15 2017, 2:00 PM (18 w, 2 d)
Wed, Apr 18
Thanks for the summary, John. To confirm, I found two examples of bugs involving local variables, as well as the field-based examples. And, indeed, all of the false positives were in unit tests.
Mon, Apr 16
A further concern about this in the general case from the reviewer of one of my test-cleanup changes: The "var = *&var" idiom is not necessarily equivalent to "var = var" in cases of user-defined types, because operator& may be overloaded.
Some further statistics, now that I've done a full cleanup on our code:
Sun, Apr 15
Further note: I'm noticing that nearly all the signal is from -Wself-assign-field and all the noise is from -Wself-assign. So that would be one obvious way to make this higher-signal in what's enabled in -Wall, if that were a desire.
I have noticed two things when attempting to release LLVM with this revision internally at Google:
Dec 15 2017
We're seeing about 10% regressions in an internal benchmark as a result of this change. Still digging further, but wanted to send a heads-up.