https://github.com/bricknerb created https://github.com/llvm/llvm-project/pull/116612
None >From 26e955a339c9b676d48711ee54713092c0401d48 Mon Sep 17 00:00:00 2001 From: Boaz Brickner <brick...@google.com> Date: Mon, 18 Nov 2024 14:29:07 +0100 Subject: [PATCH] [clang] [NFC] Merge conditions --- clang/lib/Sema/CheckExprLifetime.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clang/lib/Sema/CheckExprLifetime.cpp b/clang/lib/Sema/CheckExprLifetime.cpp index a1a402b4a2b530..2dbd9862802e7a 100644 --- a/clang/lib/Sema/CheckExprLifetime.cpp +++ b/clang/lib/Sema/CheckExprLifetime.cpp @@ -1095,9 +1095,7 @@ static bool pathOnlyHandlesGslPointer(const IndirectLocalPath &Path) { } static bool isAssignmentOperatorLifetimeBound(CXXMethodDecl *CMD) { - if (!CMD) - return false; - return isNormalAssignmentOperator(CMD) && CMD->param_size() == 1 && + return CMD && isNormalAssignmentOperator(CMD) && CMD->param_size() == 1 && CMD->getParamDecl(0)->hasAttr<LifetimeBoundAttr>(); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits