[clang] ef409e6 - [clang][bytecode] Add an assertion in initScope() op (#189972)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 2 08:49:53 PDT 2026
Author: Timm Baeder
Date: 2026-04-02T17:49:46+02:00
New Revision: ef409e649c929a3daf97f2b2bd26329d9c69406a
URL: https://github.com/llvm/llvm-project/commit/ef409e649c929a3daf97f2b2bd26329d9c69406a
DIFF: https://github.com/llvm/llvm-project/commit/ef409e649c929a3daf97f2b2bd26329d9c69406a.diff
LOG: [clang][bytecode] Add an assertion in initScope() op (#189972)
I've run into a problem in a branch lately that would've benefitted from
this assertion.
Added:
Modified:
clang/lib/AST/ByteCode/InterpFrame.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/ByteCode/InterpFrame.cpp b/clang/lib/AST/ByteCode/InterpFrame.cpp
index 0d429e773f88f..1c7d65dc28e02 100644
--- a/clang/lib/AST/ByteCode/InterpFrame.cpp
+++ b/clang/lib/AST/ByteCode/InterpFrame.cpp
@@ -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();
}
}
More information about the cfe-commits
mailing list