New loplugin:selfinit

Desktop / LibreOffice - Stephan Bergmann [] - 17 April 2019 19:59 EDT find more bugs like the one addressed in 6340daac7b99c65249363a4bb61c492de31ef5d6 "Revert broken loplugin:sequentialassign change". What it does is: "Warn when a variable is referenced from its own initializer. This is not invalid in general (see C++17 []), but is at least suspicious." It found one false positive (addressed with 884ad0d1af88f9985d30ef0dfe92d89e82f8e576 "Split localProcessFactory function into class with setter and getter") and five true positives (addressed with e0ccbe72ed6eb0d309ed272a78fd67a512acff5d "Fix use of
variable before its lifetime begins" and 0e335af4d3f044511551fa2ede20911beaee9b41 "Fix uses of variables before their lifetimes begin").

Change-Id: I4c45cceaa042e93b37ad24a54784c027f6ca1f87 Reviewed-on:

05a0c51ced86 New loplugin:selfinit
compilerplugins/clang/selfinit.cxx | 88 ++++++++++++++++++++++++++++
compilerplugins/clang/test/selfinit.cxx | 33 +++++++++++
solenv/ | 1 +
3 files changed, 122 insertions(+)


  • Share