Skip to content
Commit c8f81ee1 authored by Martin Braenne's avatar Martin Braenne
Browse files

[clang-tidy] bugprone-use-after-move: Ctor arguments should be sequenced if...

[clang-tidy] bugprone-use-after-move: Ctor arguments should be sequenced if ctor call is written as list-initialization.

See

https://timsong-cpp.github.io/cppwp/n4868/dcl.init#list-4

This eliminates a false positive in bugprone-use-after-move; this newly added
test used to be falsely classified as a use-after-move:

```
    A a;
    S3 s3{a.getInt(), std::move(a)};
```

Reviewed By: PiotrZSL

Differential Revision: https://reviews.llvm.org/D148110
parent c3f1faf9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment