[clang] [clang][bytecode] Add an assertion in initScope() op (PR #189972)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 2 21:11:34 PDT 2026


================
@@ -97,6 +97,7 @@ void InterpFrame::initScope(unsigned Idx) {
     return;
 
   for (auto &Local : Func->getScope(Idx).locals()) {
+    assert(!localBlock(Local.Offset)->isInitialized());
     localBlock(Local.Offset)->invokeCtor();
----------------
tbaederr wrote:

Yes but now it's more obvious where the problem is just from looking at the failed assertion.

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


More information about the cfe-commits mailing list