[clang] [clang] [NFC] Merge conditions (PR #116612)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 18 05:31:18 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Boaz Brickner (bricknerb)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/116612.diff
1 Files Affected:
- (modified) clang/lib/Sema/CheckExprLifetime.cpp (+1-3)
``````````diff
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>();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/116612
More information about the cfe-commits
mailing list