llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/217877.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/EvalEmitter.cpp (+2-2) - (modified) clang/lib/AST/ByteCode/EvaluationResult.cpp (-1) - (modified) clang/lib/AST/ByteCode/EvaluationResult.h (+2-2) ``````````diff diff --git a/clang/lib/AST/ByteCode/EvalEmitter.cpp b/clang/lib/AST/ByteCode/EvalEmitter.cpp index 59eb2731534ce..6233be831f9f2 100644 --- a/clang/lib/AST/ByteCode/EvalEmitter.cpp +++ b/clang/lib/AST/ByteCode/EvalEmitter.cpp @@ -254,7 +254,7 @@ template <> bool EvalEmitter::emitRet<PT_Ptr>(SourceInfo Info) { if (this->PtrCB) return (*this->PtrCB)(S, CodePtr(), Ptr); - if (!EvalResult.checkDynamicAllocations(S, Ctx, Ptr, Info)) + if (!EvalResult.checkDynamicAllocations(S, Ptr, Info)) return false; if (CheckFullyInitialized && !EvalResult.checkFullyInitialized(S, Ptr)) return false; @@ -324,7 +324,7 @@ bool EvalEmitter::emitRetVoid(SourceInfo Info) { bool EvalEmitter::emitRetValue(SourceInfo Info) { const auto &Ptr = S.Stk.pop<Pointer>(); - if (!EvalResult.checkDynamicAllocations(S, Ctx, Ptr, Info)) + if (!EvalResult.checkDynamicAllocations(S, Ptr, Info)) return false; if (CheckFullyInitialized && !EvalResult.checkFullyInitialized(S, Ptr)) return false; diff --git a/clang/lib/AST/ByteCode/EvaluationResult.cpp b/clang/lib/AST/ByteCode/EvaluationResult.cpp index 19a2744f73f15..6597ea062a8fb 100644 --- a/clang/lib/AST/ByteCode/EvaluationResult.cpp +++ b/clang/lib/AST/ByteCode/EvaluationResult.cpp @@ -244,7 +244,6 @@ static void collectBlocks(PtrView Ptr, llvm::SetVector<const Block *> &Blocks, } bool EvaluationResult::checkDynamicAllocations(InterpState &S, - const Context &Ctx, const Pointer &Ptr, SourceInfo Info) { if (!Ptr.isBlockPointer()) diff --git a/clang/lib/AST/ByteCode/EvaluationResult.h b/clang/lib/AST/ByteCode/EvaluationResult.h index 1edd9bc55406a..b8d8ddf981f5a 100644 --- a/clang/lib/AST/ByteCode/EvaluationResult.h +++ b/clang/lib/AST/ByteCode/EvaluationResult.h @@ -80,8 +80,8 @@ class EvaluationResult final { bool checkFullyInitialized(InterpState &S, const Pointer &Ptr) const; /// Check that none of the blocks the given pointer (transitively) points /// to are dynamically allocated. - bool checkDynamicAllocations(InterpState &S, const Context &Ctx, - const Pointer &Ptr, SourceInfo Info); + bool checkDynamicAllocations(InterpState &S, const Pointer &Ptr, + SourceInfo Info); QualType getSourceType() const { if (const auto *D = Source.asValueDecl()) `````````` </details> https://github.com/llvm/llvm-project/pull/217877 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
