llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>

I've run into a problem in a branch lately that would've benefitted from this 
assertion.

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


1 Files Affected:

- (modified) clang/lib/AST/ByteCode/InterpFrame.cpp (+1) 


``````````diff
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();
   }
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/189972
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to