[clang] 91c1699 - [clang] [NFC] Merge conditions (#116612)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 19 00:57:03 PST 2024
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>();
}
More information about the cfe-commits
mailing list