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 -- 
clang/lib/Sema/SemaType.cpp clang/test/SemaCXX/cxx2b-deducing-this.cpp 
--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/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 46b668b7e..28bb352b1 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -4838,7 +4838,7 @@ static TypeSourceInfo 
*GetFullTypeForDeclarator(TypeProcessingState &state,
         // If there already was an problem with the scope, don’t issue another
         // error about the explicit object parameter.
         return SS.isInvalid() ||
-                isa_and_present<CXXRecordDecl>(S.computeDeclContext(SS));
+               isa_and_present<CXXRecordDecl>(S.computeDeclContext(SS));
       };
 
       // C++23 [dcl.fct]p6:
@@ -4858,9 +4858,8 @@ static TypeSourceInfo 
*GetFullTypeForDeclarator(TypeProcessingState &state,
       // - a lambda-declarator [expr.prim.lambda].
       DeclaratorContext C = D.getContext();
       ParmVarDecl *First =
-          FTI.NumParams
-              ? dyn_cast_if_present<ParmVarDecl>(FTI.Params[0].Param)
-              : nullptr;
+          FTI.NumParams ? dyn_cast_if_present<ParmVarDecl>(FTI.Params[0].Param)
+                        : nullptr;
 
       bool IsFunctionDecl = D.getInnermostNonParenChunk() == &DeclType;
       if (First && First->isExplicitObjectParameter() &&
@@ -4877,12 +4876,11 @@ static TypeSourceInfo 
*GetFullTypeForDeclarator(TypeProcessingState &state,
           !IsClassType(D.getCXXScopeSpec())) {
         if (IsFunctionDecl)
           S.Diag(First->getBeginLoc(),
-                  diag::err_explicit_object_parameter_nonmember)
-              << /*non-member*/ 2 << /*function*/ 0
-              << First->getSourceRange();
+                 diag::err_explicit_object_parameter_nonmember)
+              << /*non-member*/ 2 << /*function*/ 0 << First->getSourceRange();
         else
           S.Diag(First->getBeginLoc(),
-                  diag::err_explicit_object_parameter_invalid)
+                 diag::err_explicit_object_parameter_invalid)
               << First->getSourceRange();
 
         // Do let non-member function have explicit parameters

``````````

</details>


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

Reply via email to