[clang] [llvm] [CLANG][OpenMP] Add support for OpenMP6.0 transparent clause (PR #166810)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 6 09:19:53 PST 2025


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/test/OpenMP/task_transparent_messages.cpp clang/include/clang/AST/OpenMPClause.h clang/include/clang/AST/RecursiveASTVisitor.h clang/include/clang/Basic/OpenMPKinds.h clang/include/clang/Sema/SemaOpenMP.h clang/lib/AST/OpenMPClause.cpp clang/lib/AST/StmtProfile.cpp clang/lib/Basic/OpenMPKinds.cpp clang/lib/CodeGen/CGOpenMPRuntime.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/test/OpenMP/task_ast_print.cpp clang/test/OpenMP/task_codegen.cpp clang/test/OpenMP/taskloop_ast_print.cpp clang/test/OpenMP/taskloop_codegen.cpp clang/tools/libclang/CIndex.cpp llvm/include/llvm/Frontend/OpenMP/ClauseT.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/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h
index a56b69fa3..ddfde86e1 100644
--- a/clang/include/clang/AST/OpenMPClause.h
+++ b/clang/include/clang/AST/OpenMPClause.h
@@ -1548,8 +1548,8 @@ public:
   /// \param LParenLoc Location of '('.
   /// \param EndLoc Ending location of the clause.
   OMPTransparentClause(OpenMPTransparentKind A, SourceLocation ALoc,
-                     SourceLocation StartLoc, SourceLocation LParenLoc,
-                     SourceLocation EndLoc)
+                       SourceLocation StartLoc, SourceLocation LParenLoc,
+                       SourceLocation EndLoc)
       : OMPClause(llvm::omp::OMPC_transparent, StartLoc, EndLoc),
         LParenLoc(LParenLoc), Kind(A), KindLoc(ALoc) {}
 
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp
index e05d3bec9..cd1657525 100644
--- a/clang/lib/AST/StmtProfile.cpp
+++ b/clang/lib/AST/StmtProfile.cpp
@@ -548,7 +548,8 @@ void OMPClauseProfiler::VisitOMPDefaultClause(const OMPDefaultClause *C) { }
 
 void OMPClauseProfiler::VisitOMPThreadsetClause(const OMPThreadsetClause *C) {}
 
-void OMPClauseProfiler::VisitOMPTransparentClause(const OMPTransparentClause *C) {}
+void OMPClauseProfiler::VisitOMPTransparentClause(
+    const OMPTransparentClause *C) {}
 
 void OMPClauseProfiler::VisitOMPProcBindClause(const OMPProcBindClause *C) { }
 
diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp
index ee0d5194d..e7d8f6460 100644
--- a/clang/lib/Basic/OpenMPKinds.cpp
+++ b/clang/lib/Basic/OpenMPKinds.cpp
@@ -597,8 +597,8 @@ const char *clang::getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind,
     switch (Type) {
     case OMPC_TRANSPARENT_unknown:
       return "unknown";
-#define OPENMP_TRANSPARENT_KIND(Name)                                            \
-  case OMPC_TRANSPARENT_##Name:                                                  \
+#define OPENMP_TRANSPARENT_KIND(Name)                                          \
+  case OMPC_TRANSPARENT_##Name:                                                \
     return #Name;
 #include "clang/Basic/OpenMPKinds.def"
     }
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 6230bab9f..faebf5048 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -2408,7 +2408,8 @@ void OMPClauseEnqueue::VisitOMPFailClause(const OMPFailClause *) {}
 
 void OMPClauseEnqueue::VisitOMPThreadsetClause(const OMPThreadsetClause *) {}
 
-void OMPClauseEnqueue::VisitOMPTransparentClause(const OMPTransparentClause *) {}
+void OMPClauseEnqueue::VisitOMPTransparentClause(const OMPTransparentClause *) {
+}
 
 void OMPClauseEnqueue::VisitOMPAbsentClause(const OMPAbsentClause *) {}
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/166810


More information about the llvm-commits mailing list