[all-commits] [llvm/llvm-project] 970eca: [Clang][Sema] Fix crash in __builtin_dump_struct w...
Vladislav Semykin via All-commits
all-commits at lists.llvm.org
Tue May 26 01:16:39 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 970ecaef1db3701f04e63223ce9188a748be6083
https://github.com/llvm/llvm-project/commit/970ecaef1db3701f04e63223ce9188a748be6083
Author: Vladislav Semykin <34096407+ViNN280801 at users.noreply.github.com>
Date: 2026-05-26 (Tue, 26 May 2026)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaExpr.cpp
M clang/test/SemaCXX/cxx2a-consteval.cpp
Log Message:
-----------
[Clang][Sema] Fix crash in __builtin_dump_struct with immediate callables (#192880)
## Motivation
`ComplexRemove` (used by `Sema::PopExpressionEvaluationContext` to strip
nested `ConstantExpr` wrappers) inherits the default
`TreeTransform::TransformOpaqueValueExpr`, which asserts on any
`OpaqueValueExpr` with a non-null `SourceExpr` unless a binding has
already been set up.
`__builtin_dump_struct` binds the record pointer to an `OpaqueValueExpr`
inside a `PseudoObjectExpr`. When the callable argument is
immediate-escalated (e.g. via `__builtin_is_within_lifetime`),
`RemoveNestedImmediateInvocation` roots `ComplexRemove` inside the PSE's
semantic form, reaching that OVE without the binding the assert expects
- triggering a crash.
## Closing Issues
Closes #192846
---------
Signed-off-by: ViNN280801 <vladislav.semykin at gmail.com>
Co-authored-by: Corentin Jabot <corentinjabot at gmail.com>
Co-authored-by: Younan Zhang <zyn7109 at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list