Skip to content

Conversation

@tbaederr
Copy link
Contributor

P.block() will assert that P is a block pointer, which it doesn't have to be here.

P.block() will assert that P is a block pointer, which it doesn't have
to be here.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:bytecode Issues for the clang bytecode constexpr interpreter labels Jun 23, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 23, 2025

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

Changes

P.block() will assert that P is a block pointer, which it doesn't have to be here.


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

1 Files Affected:

  • (modified) clang/lib/AST/ByteCode/Pointer.cpp (-1)
diff --git a/clang/lib/AST/ByteCode/Pointer.cpp b/clang/lib/AST/ByteCode/Pointer.cpp
index 50453c72c582b..f0b0384f32ac8 100644
--- a/clang/lib/AST/ByteCode/Pointer.cpp
+++ b/clang/lib/AST/ByteCode/Pointer.cpp
@@ -114,7 +114,6 @@ void Pointer::operator=(Pointer &&P) {
     }
 
     if (Block *Pointee = PointeeStorage.BS.Pointee) {
-      assert(P.block() != this->block());
       Pointee->removePointer(this);
       PointeeStorage.BS.Pointee = nullptr;
       Pointee->cleanup();

@tbaederr tbaederr merged commit c445ca5 into llvm:main Jun 23, 2025
11 checks passed
anthonyhatran pushed a commit to anthonyhatran/llvm-project that referenced this pull request Jun 26, 2025
P.block() will assert that P is a block pointer, which it doesn't have
to be here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:bytecode Issues for the clang bytecode constexpr interpreter clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants