Wrong end location for `VarDecl` that is move constructed from a prvalue
Open
clang:frontend
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
See https://godbolt.org/z/jPcdfeW6G.
```c++
// Minimal repro.
struct S {};
S MakeS();
void f() {
S s(MakeS());
}
```
The source range for the `VarDecl` `s` ends on the first `)`, which is part of the call to `MakeS()`.
This occurs starting in C++17. In [C++14](https://godbolt.org/z/ov9vzjG7K), there is a `ExprWithCleanups`, `CXXConstructExpr`, and `MaterializeTemporaryExpr` between the `VarDecl` and the `CallExpr` to `MakeS()`. This seems similar to #143711, except this time we lose a paren, instead of gaining one.
Contributor guide
Assessment
This issue has not been assessed yet.