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 -- 
clang/test/OpenMP/declare_variant_adjust_args_positional_ast_print.cpp 
clang/test/OpenMP/declare_variant_adjust_args_positional_messages.cpp 
clang/test/OpenMP/declare_variant_adjust_args_positional_template.cpp 
clang/include/clang-c/Index.h clang/include/clang/AST/ComputeDependence.h 
clang/include/clang/AST/ExprOpenMP.h clang/include/clang/AST/OpenMPClause.h 
clang/include/clang/AST/RecursiveASTVisitor.h 
clang/include/clang/AST/TextNodeDumper.h clang/include/clang/Parse/Parser.h 
clang/include/clang/Sema/SemaOpenMP.h 
clang/include/clang/Serialization/ASTBitCodes.h clang/lib/AST/AttrImpl.cpp 
clang/lib/AST/ComputeDependence.cpp clang/lib/AST/Expr.cpp 
clang/lib/AST/ExprClassification.cpp clang/lib/AST/ExprConstant.cpp 
clang/lib/AST/ItaniumMangle.cpp clang/lib/AST/OpenMPClause.cpp 
clang/lib/AST/StmtPrinter.cpp clang/lib/AST/StmtProfile.cpp 
clang/lib/AST/TextNodeDumper.cpp clang/lib/Parse/ParseOpenMP.cpp 
clang/lib/Sema/SemaExceptionSpec.cpp clang/lib/Sema/SemaOpenMP.cpp 
clang/lib/Sema/TreeTransform.h clang/lib/Serialization/ASTReaderStmt.cpp 
clang/lib/Serialization/ASTWriterStmt.cpp 
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp 
clang/test/OpenMP/declare_variant_clauses_messages.cpp 
clang/tools/libclang/CIndex.cpp clang/tools/libclang/CXCursor.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/include/clang/Sema/SemaOpenMP.h 
b/clang/include/clang/Sema/SemaOpenMP.h
index 89ef8f598..87106a4de 100644
--- a/clang/include/clang/Sema/SemaOpenMP.h
+++ b/clang/include/clang/Sema/SemaOpenMP.h
@@ -1503,7 +1503,8 @@ public:
   /// Called on a well-formed 'adjust_args' parameter range 'lb:ub'. Either
   /// bound may be null, meaning 1 for \a LowerBound and 'omp_num_args' for
   /// \a UpperBound.
-  ExprResult ActOnOMPArgumentRangeExpr(Expr *LowerBound, SourceLocation 
ColonLoc,
+  ExprResult ActOnOMPArgumentRangeExpr(Expr *LowerBound,
+                                       SourceLocation ColonLoc,
                                        Expr *UpperBound);
 
   ExprResult ActOnOpenMPDimsModifier(OpenMPClauseKind Kind, int Modifier,
diff --git a/clang/lib/AST/OpenMPClause.cpp b/clang/lib/AST/OpenMPClause.cpp
index c7c3237bb..062a4ee83 100644
--- a/clang/lib/AST/OpenMPClause.cpp
+++ b/clang/lib/AST/OpenMPClause.cpp
@@ -3244,8 +3244,7 @@ static bool evalOMPAdjustArgsBound(const Expr *Bound, 
unsigned NumArgs,
     if (const Expr *OffsetExpr = NumArgsExpr->getOffset()) {
       if (OffsetExpr->isValueDependent())
         return false;
-      std::optional<llvm::APSInt> Val =
-          OffsetExpr->getIntegerConstantExpr(Ctx);
+      std::optional<llvm::APSInt> Val = 
OffsetExpr->getIntegerConstantExpr(Ctx);
       if (!Val)
         return false;
       Offset = Val->getExtValue();
@@ -3278,8 +3277,7 @@ bool clang::resolveOMPAdjustArgsItem(const Expr *Item, 
const FunctionDecl *FD,
       return false;
     unsigned Index = PVD->getFunctionScopeIndex();
     if (FD->getNumParams() > Index &&
-        FD->getParamDecl(Index)->getCanonicalDecl() ==
-            PVD->getCanonicalDecl())
+        FD->getParamDecl(Index)->getCanonicalDecl() == PVD->getCanonicalDecl())
       AppendIfInRange(static_cast<int64_t>(Index) + 1);
     return true;
   }
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index e2f82d72f..90e74358e 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -4849,7 +4849,7 @@ bool 
Parser::ParseOpenMPAdjustArgsList(SmallVectorImpl<Expr *> &Vars) {
       }
       Vars.push_back(Actions.OpenMP()
                          .ActOnOMPArgumentRangeExpr(LowerBound.get(), ColonLoc,
-                                                     UpperBound.get())
+                                                    UpperBound.get())
                          .get());
     } else if (LowerBound.isUsable()) {
       // Without a colon the item is a parameter name or a position, and is
@@ -4867,8 +4867,7 @@ bool 
Parser::ParseOpenMPAdjustArgsList(SmallVectorImpl<Expr *> &Vars) {
     // Separator handling mirrors the shared var-list loop, so that a malformed
     // item such as '1:2:3' diagnoses instead of silently mis-parsing.
     if (Tok.isNot(tok::comma)) {
-      if (Tok.isNot(tok::r_paren) &&
-          Tok.isNot(tok::annot_pragma_openmp_end)) {
+      if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::annot_pragma_openmp_end)) {
         Diag(Tok, diag::err_omp_expected_punc)
             << getOpenMPClauseName(OMPC_adjust_args) << /*IsDirective=*/0;
         IsError = true;
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index bad28f400..8ed1e62c2 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -8006,8 +8006,8 @@ void SemaOpenMP::ActOnOpenMPDeclareVariantDirective(
   // and a name does not collide with a position that happens to resolve to
   // it. In 5.1 this restriction lived in the declare variant directive's own
   // restrictions and was worded per-argument rather than per-item.
-  llvm::SmallPtrSet<const VarDecl *, 4> AdjustVars;  // named items
-  llvm::SmallSet<uint64_t, 4> AdjustPositions;       // literal positional 
items
+  llvm::SmallPtrSet<const VarDecl *, 4> AdjustVars; // named items
+  llvm::SmallSet<uint64_t, 4> AdjustPositions;      // literal positional items
 
   for (Expr *E : AllAdjustArgs) {
     Expr *Item = E->IgnoreParenImpCasts();
@@ -27340,8 +27340,8 @@ ExprResult 
SemaOpenMP::ActOnOMPNumArgsExpr(SourceLocation NumArgsLoc,
   }
   // The value stands for a number of arguments, so the expression is an int
   // even though it cannot be evaluated until the parameter list is consumed.
-  return new (Context) OMPNumArgsExpr(Context.IntTy, NumArgsLoc, OpLoc,
-                                      IsSubtraction, Offset);
+  return new (Context)
+      OMPNumArgsExpr(Context.IntTy, NumArgsLoc, OpLoc, IsSubtraction, Offset);
 }
 
 ExprResult SemaOpenMP::ActOnOMPArgumentRangeExpr(Expr *LowerBound,
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index b21171fc2..427732e67 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -14197,8 +14197,9 @@ ExprResult 
TreeTransform<Derived>::TransformOMPNumArgsExpr(OMPNumArgsExpr *E) {
   if (!getDerived().AlwaysRebuild() && Offset.get() == E->getOffset())
     return E;
 
-  return getDerived().RebuildOMPNumArgsExpr(
-      E->getNumArgsLoc(), E->getOperatorLoc(), E->isSubtraction(), 
Offset.get());
+  return getDerived().RebuildOMPNumArgsExpr(E->getNumArgsLoc(),
+                                            E->getOperatorLoc(),
+                                            E->isSubtraction(), Offset.get());
 }
 
 template <typename Derived>
@@ -14218,8 +14219,7 @@ 
TreeTransform<Derived>::TransformOMPArgumentRangeExpr(OMPArgumentRangeExpr *E) {
       return ExprError();
   }
 
-  if (!getDerived().AlwaysRebuild() &&
-      LowerBound.get() == E->getLowerBound() &&
+  if (!getDerived().AlwaysRebuild() && LowerBound.get() == E->getLowerBound() 
&&
       UpperBound.get() == E->getUpperBound())
     return E;
 

``````````

</details>


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

Reply via email to