blob: 2631d9056e85125f0b436f3d17536ca8ab4080c0 [file] [log] [blame]
.. title:: clang-tidy - modernize-return-braced-init-list
modernize-return-braced-init-list
=================================
Replaces explicit calls to the constructor in a return with a braced
initializer list. This way the return type is not needlessly duplicated in the
function definition and the return statement.
.. code:: c++
Foo bar() {
Baz baz;
return Foo(baz);
}
// transforms to:
Foo bar() {
Baz baz;
return {baz};
}