[llvm-branch-commits] [clang] [clang][OpenMP] Pass OpenMP version to getOpenMPDirectiveName (PR #139115)

Alexey Bataev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu May 8 10:51:00 PDT 2025


================
@@ -965,13 +965,13 @@ void StmtPrinter::VisitOMPTeamsDirective(OMPTeamsDirective *Node) {
 void StmtPrinter::VisitOMPCancellationPointDirective(
     OMPCancellationPointDirective *Node) {
   Indent() << "#pragma omp cancellation point "
-           << getOpenMPDirectiveName(Node->getCancelRegion());
+           << getOpenMPDirectiveName(Node->getCancelRegion(), Policy.OpenMP);
----------------
alexey-bataev wrote:

The version can be obtained via Context->getLangOpts().OpenMP, if Context is non-nullptr.

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


More information about the llvm-branch-commits mailing list