| Issue |
169974
|
| Summary |
Wrong end location for `VarDecl` that is move constructed from a prvalue
|
| Labels |
bug,
clang:frontend
|
| Assignees |
|
| Reporter |
tJener
|
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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs