[clang] [Clang][Sema] Fix crash in RemoveNestedImmediateInvocation with __builtin_dump_struct (PR #192880)

Vladislav Semykin via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 20 00:38:46 PDT 2026


ViNN280801 wrote:

@zyn0217, hi, I carefully read this for now, thanks for mention it.
Assisted-by: Claude Sonnet 4.6 web version.

To be transparent:

- The fix itself (`TransformOpaqueValueExpr` override in `ComplexRemove`, the `DenseMap` memoization, the provisional self-mapping before recursion) was written by me. I used Claude as a sounding board to talk through the alternatives - returning `E` unchanged, overriding `AlreadyTransformed`, in-place `setSourceExpr` mutation - and to sanity-check my reasoning about OVE lifecycle within `ComplexRemove`'s transform scope.
- The PR description was written by me but reviewed and copy-edited with Claude's help. Per the policy, I'm aware this means I'm fully accountable for its accuracy, andI can answer questions about any part of the implementation.
- The test case `builtin-dump-struct-immediate.cpp` was authored by me based on the reproducer in #192846 and my own understanding of the code path. The test case `builtin-dump-struct-immediate-clean.cpp` was written by Claude based on `builtin-dump-struct-immediate.cpp`.

I never use autocheckings or autocorrections without my review, it's not my approach.
This is my first PR to llvm-project, so, maybe I really don't need to use LLM at all but I tried to ensure max quality as I can. If anything in the description or implementation looks unclear or incorrect, I'm happy to address it directly.

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


More information about the cfe-commits mailing list