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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to