Although clang++ does not warn this, it's better to avoid returning void
expression.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
what's so bad in returning void expression from a function returning void?
Not that I assert it's a great practice, but it makes the code shorter and I can't imagine where it can lead to problems.
If this is indeed a bad pattern, let's implement a clang warning.
Comment Actions
Sorry. You're right. This is valid in C++ standard. I thought that this should be avoided because clang warns in C code. I personally avoid this pattern in C++. I should have checked the standard before sending this patch.