llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) <details> <summary>Changes</summary> A null Pointee shouldn't happen anymore. --- Full diff: https://github.com/llvm/llvm-project/pull/174368.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Pointer.cpp (+2-3) ``````````diff diff --git a/clang/lib/AST/ByteCode/Pointer.cpp b/clang/lib/AST/ByteCode/Pointer.cpp index 2e38c1bb65d36..5d11321d09079 100644 --- a/clang/lib/AST/ByteCode/Pointer.cpp +++ b/clang/lib/AST/ByteCode/Pointer.cpp @@ -33,13 +33,12 @@ Pointer::Pointer(Block *Pointee, uint64_t BaseAndOffset) Pointer::Pointer(Block *Pointee, unsigned Base, uint64_t Offset) : Offset(Offset), StorageKind(Storage::Block) { + assert(Pointee); assert((Base == RootPtrMark || Base % alignof(void *) == 0) && "wrong base"); assert(Base >= Pointee->getDescriptor()->getMetadataSize()); BS = {Pointee, Base, nullptr, nullptr}; - - if (Pointee) - Pointee->addPointer(this); + Pointee->addPointer(this); } Pointer::Pointer(const Pointer &P) `````````` </details> https://github.com/llvm/llvm-project/pull/174368 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
