[clang] Extend life of variables in `DiagComparison` in `ExprConstant` (PR #79522)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 26 00:16:28 PST 2024
https://github.com/cor3ntin requested changes to this pull request.
We need to understand what's going on here.
I suspect something gets tripped by the ternary.
A temporary fix might be to assign
```cpp
std::string first = Reversed ? RHS : LHS;
std::string second = Reversed ? LHS : RHS;
```
And use that in the diag.
We should also add a `std::string&&` overload to the diagnostic engine's `operator <<` to avoid extra copies, although that's mostly a luxury
https://github.com/llvm/llvm-project/pull/79522
More information about the cfe-commits
mailing list