[clang] Extend life of variables in `DiagComparison` in `ExprConstant` (PR #79522)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 26 12:24:19 PST 2024


https://github.com/shafik commented:

I believe the problem is that `DiagComparison` is capturing the locals `LHSValue` and `RHSValue` the lambda is being returned, the local are not longer in lifetime but we are calling `toString` on them. 

Maybe there is some SSO going on here that changes when using statics.

I think it would be useful to pop into a debugger and see what is going on frame by frame.

https://github.com/llvm/llvm-project/pull/79522


More information about the cfe-commits mailing list