readability-else-after-return triggers for this pattern: if (int x = ...) { ... return 0; } else { // Do something with x } Removing the else clause would trigger a build error as x is no longer in scope (translating a bug report from a user)
This should in principle apply to C++17 `if (auto Foo = bar(); Foo.method())`, right?
In this particular report the user was interested in C++11 only. But in principle - yes. I've submitted a patch to address this issue (r351751). Didn't check it for C++17 though.