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 origin/main HEAD --extensions cpp,h,c -- 
clang/test/CodeGen/WebAssembly/wasm-multivalue-abi.c 
clang/test/CodeGen/WebAssembly/wasm-multivalue-functype.c 
clang/test/Sema/attr-wasm-multivalue.c clang/include/clang/Basic/Specifiers.h 
clang/lib/AST/ItaniumMangle.cpp clang/lib/AST/Type.cpp 
clang/lib/AST/TypePrinter.cpp clang/lib/Basic/Targets/WebAssembly.h 
clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/CGDebugInfo.cpp 
clang/lib/CodeGen/Targets/WebAssembly.cpp clang/lib/Sema/SemaDeclAttr.cpp 
clang/lib/Sema/SemaType.cpp llvm/include/llvm/AsmParser/LLToken.h 
llvm/include/llvm/IR/CallingConv.h llvm/lib/AsmParser/LLLexer.cpp 
llvm/lib/AsmParser/LLParser.cpp llvm/lib/IR/AsmWriter.cpp 
llvm/lib/IR/Function.cpp 
llvm/lib/Target/WebAssembly/GISel/WebAssemblyCallLowering.cpp 
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp 
llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp 
llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp 
llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp 
llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/Targets/WebAssembly.cpp 
b/clang/lib/CodeGen/Targets/WebAssembly.cpp
index 8942e3e78..6cc55c101 100644
--- a/clang/lib/CodeGen/Targets/WebAssembly.cpp
+++ b/clang/lib/CodeGen/Targets/WebAssembly.cpp
@@ -37,8 +37,7 @@ private:
   void computeInfo(CGFunctionInfo &FI) const override {
     llvm::CallingConv::ID CC = FI.getCallingConvention();
     if (!getCXXABI().classifyReturnType(FI))
-      FI.getReturnInfo() =
-          classifyReturnType(FI.getReturnType(), CC);
+      FI.getReturnInfo() = classifyReturnType(FI.getReturnType(), CC);
     for (auto &Arg : FI.arguments())
       Arg.info = classifyArgumentType(Arg.type, CC);
   }
@@ -107,7 +106,8 @@ public:
 /// scalars, a bit-field, or a flexible array member).
 ///
 /// Note that this is similar to `isSingleElementStruct` in structure.
-static std::optional<unsigned> countScalarFields(ASTContext &Context, QualType 
T) {
+static std::optional<unsigned> countScalarFields(ASTContext &Context,
+                                                 QualType T) {
   const auto *RD = T->getAsRecordDecl();
   if (!RD)
     return std::nullopt;
@@ -143,8 +143,9 @@ static std::optional<unsigned> countScalarFields(ASTContext 
&Context, QualType T
 }
 
 /// Classify argument of given type \p Ty.
-ABIArgInfo WebAssemblyABIInfo::classifyArgumentType(QualType Ty,
-                                                    llvm::CallingConv::ID CC) 
const {
+ABIArgInfo
+WebAssemblyABIInfo::classifyArgumentType(QualType Ty,
+                                         llvm::CallingConv::ID CC) const {
   Ty = useFirstFieldIfTransparentUnion(Ty);
 
   if (isAggregateTypeForABI(Ty)) {
@@ -186,8 +187,9 @@ ABIArgInfo 
WebAssemblyABIInfo::classifyArgumentType(QualType Ty,
   return defaultInfo.classifyArgumentType(Ty);
 }
 
-ABIArgInfo WebAssemblyABIInfo::classifyReturnType(QualType RetTy,
-                                                  llvm::CallingConv::ID CC) 
const {
+ABIArgInfo
+WebAssemblyABIInfo::classifyReturnType(QualType RetTy,
+                                       llvm::CallingConv::ID CC) const {
   if (isAggregateTypeForABI(RetTy)) {
     // Records with non-trivial destructors/copy-constructors should not be
     // returned by value.
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp 
b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp
index 962a664fe..9efeea734 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp
@@ -68,8 +68,8 @@ void llvm::computeSignatureVTs(const FunctionType *Ty,
 
   MVT PtrVT = MVT::getIntegerVT(TM.createDataLayout().getPointerSizeInBits());
   if (!WebAssembly::canLowerReturn(
-          Results.size(),
-          &TM.getSubtarget<WebAssemblySubtarget>(ContextFunc), TargetFunc)) {
+          Results.size(), &TM.getSubtarget<WebAssemblySubtarget>(ContextFunc),
+          TargetFunc)) {
     // WebAssembly can't lower returns of multiple values without demoting to
     // sret unless multivalue is enabled (see
     // WebAssemblyTargetLowering::CanLowerReturn). So replace multiple return

``````````

</details>


https://github.com/llvm/llvm-project/pull/200076
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to