Author: Boaz Brickner Date: 2024-11-19T09:57:00+01:00 New Revision: 91c1699943a7f41c337d44b965c63bb6fc96de16
URL: https://github.com/llvm/llvm-project/commit/91c1699943a7f41c337d44b965c63bb6fc96de16 DIFF: https://github.com/llvm/llvm-project/commit/91c1699943a7f41c337d44b965c63bb6fc96de16.diff LOG: [clang] [NFC] Merge conditions (#116612) Added: Modified: clang/lib/Sema/CheckExprLifetime.cpp Removed: ################################################################################ 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