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 ba131b7017ce99d56a0584e630ed542d8cd48488 
3c5e6bcb2295f142f37f9bbd0d7801b3c67c3593 -- clang/test/Sema/incorrect_pure.cpp 
clang/lib/Sema/SemaDecl.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 1951177c4c..f5a0ef327b 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -11890,11 +11890,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S, 
FunctionDecl *NewFD,
   }
 
   if (NewFD->hasAttr<PureAttr>() || NewFD->hasAttr<ConstAttr>()) {
-    if (const CXXConstructorDecl* ctor = dyn_cast<NewFD>()) {
+    if (const CXXConstructorDecl *ctor = dyn_cast<NewFD>()) {
       if (!ctor->getParent().isEmpty())
         Diag(NewFD->getLocation(), diag::warn_pure_attr_on_cxx_constructor);
-    }
-    else if (NewFD->getReturnType()->isVoidType())
+    } else if (NewFD->getReturnType()->isVoidType())
       Diag(NewFD->getLocation(), diag::warn_pure_function_returns_void);
   }
 

``````````

</details>


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

Reply via email to