Issue 165328
Summary [clang-tidy] Add new check to find redundant explicit constructor calls in function declarations
Labels clang-tidy, check-request
Assignees
Reporter vbvictor
    We already have [check](https://clang.llvm.org/extra/clang-tidy/checks/modernize/return-braced-init-list.html) to catch these cases:
```cpp
Foo bar() {
  Baz baz;
  return Foo(baz);
}

// transforms to:

Foo bar() {
  Baz baz;
  return {baz};
}
```

But we do not have check to catch these, see https://godbolt.org/z/1bdK7MG67:
```cpp
void bar(Baz baz = Baz()) {
}

// transforms to:

void bar(Baz baz = {}) {
}
```

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to