github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions c,cpp -- 
clang/lib/AST/Expr.cpp clang/test/Sema/c2x-nodiscard.c 
clang/test/SemaCXX/warn-unused-result.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index ee1a3e5f4..01add696d 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -1632,9 +1632,9 @@ QualType CallExpr::getCallReturnType(const ASTContext 
&Ctx) const {
 
 std::pair<const NamedDecl *, const WarnUnusedResultAttr *>
 Expr::getUnusedResultAttrImpl(const Decl *Callee, QualType ReturnType) {
-  // If the callee is marked nodiscard, return that attribute for the 
diagnostic.
-  // If the callee is marked candiscard, do not diagnose.
-  // If seen on the same level, candiscard beats nodiscard.
+  // If the callee is marked nodiscard, return that attribute for the
+  // diagnostic. If the callee is marked candiscard, do not diagnose. If seen 
on
+  // the same level, candiscard beats nodiscard.
   if (Callee != nullptr) {
     if (const auto *A = Callee->getAttr<CanDiscardAttr>())
       return {nullptr, nullptr};

``````````

</details>


https://github.com/llvm/llvm-project/pull/154943
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to