llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) <details> <summary>Changes</summary> There's already already an if statement before ensuring that UseFieldDesc is false. --- Full diff: https://github.com/llvm/llvm-project/pull/185360.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+1-5) ``````````diff diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp index c7d3c2e500592..a2557d4128055 100644 --- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp +++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp @@ -2333,12 +2333,8 @@ UnsignedOrNone evaluateBuiltinObjectSize(const ASTContext &ASTCtx, bool UseFieldDesc = (Kind & 1u); bool ReportMinimum = (Kind & 2u); if (!UseFieldDesc || DetermineForCompleteObject) { - // Lower bound, so we can't fall back to this. - if (ReportMinimum && UseFieldDesc && !DetermineForCompleteObject) - return std::nullopt; - // Can't read beyond the pointer decl desc. - if (!UseFieldDesc && !ReportMinimum && DeclDesc->getType()->isPointerType()) + if (!ReportMinimum && DeclDesc->getType()->isPointerType()) return std::nullopt; if (InvalidBase) `````````` </details> https://github.com/llvm/llvm-project/pull/185360 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
