[llvm-branch-commits] [OpenMP] Add graph_id and graph_reset clause support (for taskgraph directive) (PR #194048)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Apr 24 13:55:29 PDT 2026
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 h,cpp -- clang/include/clang/AST/OpenMPClause.h clang/include/clang/AST/RecursiveASTVisitor.h clang/include/clang/Sema/SemaOpenMP.h clang/lib/AST/OpenMPClause.cpp clang/lib/AST/StmtProfile.cpp clang/lib/Basic/OpenMPKinds.cpp clang/lib/Parse/ParseOpenMP.cpp clang/lib/Sema/SemaOpenMP.cpp clang/lib/Sema/TreeTransform.h clang/lib/Serialization/ASTReader.cpp clang/lib/Serialization/ASTWriter.cpp clang/tools/libclang/CIndex.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/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h
index bee7bbaf6..e18dea7d9 100644
--- a/clang/include/clang/AST/OpenMPClause.h
+++ b/clang/include/clang/AST/OpenMPClause.h
@@ -8598,8 +8598,9 @@ public:
LParenLoc(LParenLoc), Condition(Cond) {}
/// Build an empty clause.
- OMPGraphResetClause() : OMPClause(llvm::omp::OMPC_graph_reset,
- SourceLocation(), SourceLocation()) {}
+ OMPGraphResetClause()
+ : OMPClause(llvm::omp::OMPC_graph_reset, SourceLocation(),
+ SourceLocation()) {}
/// Sets the location of '('.
void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 1dd2be6dc..c4d9216e7 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -19041,7 +19041,7 @@ OMPClause *SemaOpenMP::ActOnOpenMPGraphIdClause(Expr *Id,
SourceLocation LParenLoc,
SourceLocation EndLoc) {
Expr *ValExpr = Id;
- //Stmt *HelperValStmt = nullptr;
+ // Stmt *HelperValStmt = nullptr;
OpenMPDirectiveKind CaptureRegion = OMPD_unknown;
if (!Id->isValueDependent() && !Id->isTypeDependent() &&
@@ -19065,8 +19065,8 @@ OMPClause *SemaOpenMP::ActOnOpenMPGraphIdClause(Expr *Id,
}*/
}
- return new (getASTContext()) OMPGraphIdClause(ValExpr, StartLoc, LParenLoc,
- EndLoc);
+ return new (getASTContext())
+ OMPGraphIdClause(ValExpr, StartLoc, LParenLoc, EndLoc);
}
OMPClause *SemaOpenMP::ActOnOpenMPGraphResetClause(Expr *Condition,
@@ -19074,7 +19074,7 @@ OMPClause *SemaOpenMP::ActOnOpenMPGraphResetClause(Expr *Condition,
SourceLocation LParenLoc,
SourceLocation EndLoc) {
Expr *ValExpr = Condition;
- //Stmt *HelperValStmt = nullptr;
+ // Stmt *HelperValStmt = nullptr;
OpenMPDirectiveKind CaptureRegion = OMPD_unknown;
if (Condition && LParenLoc.isValid()) {
if (!Condition->isValueDependent() && !Condition->isTypeDependent() &&
@@ -19099,8 +19099,8 @@ OMPClause *SemaOpenMP::ActOnOpenMPGraphResetClause(Expr *Condition,
}
}
- return new (getASTContext()) OMPGraphResetClause(
- ValExpr, StartLoc, LParenLoc, EndLoc);
+ return new (getASTContext())
+ OMPGraphResetClause(ValExpr, StartLoc, LParenLoc, EndLoc);
}
OMPClause *SemaOpenMP::ActOnOpenMPNovariantsClause(Expr *Condition,
``````````
</details>
https://github.com/llvm/llvm-project/pull/194048
More information about the llvm-branch-commits
mailing list