Issue |
145798
|
Summary |
[clang-tidy] Check request: modernize-use-auto-temporary
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
denzor200
|
C++23 suggests us the way to make a temporary copy of an object without creating a variable.
Need a check that fill find places in the code that mignt be improved using this new feature and will provide fixit hint to change that.
BEFORE:
```
void example(const auto& arg) {
const auto copy = get();
process(copy);
process(std::decay_t<decltype(arg)>{arg});
}
```
AFTER:
```
void example(const auto& arg) {
process(auto{copy});
process(auto{arg});
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs