[clang] [clang][openmp] Fixing Issue-162243 (PR #165562)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 29 06:38:43 PDT 2025


https://github.com/Ritanya-B-Bharadwaj created https://github.com/llvm/llvm-project/pull/165562

This fixes the issue - https://github.com/llvm/llvm-project/issues/162243 caused by https://github.com/llvm/llvm-project/pull/158134

>From c62f5414a6392fbe0ae7940fbfa5232576979205 Mon Sep 17 00:00:00 2001
From: Ritanya-B-Bharadwaj <ritanya.b.bharadwaj at gmail.com>
Date: Wed, 29 Oct 2025 19:05:24 +0530
Subject: [PATCH] Fixing Issue-162243

---
 clang/lib/Sema/SemaOpenMP.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 0fa21e89b1236..06b87a4208702 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -3286,7 +3286,7 @@ SemaOpenMP::ActOnOpenMPGroupPrivateDirective(SourceLocation Loc,
                                              ArrayRef<Expr *> VarList) {
   if (!getLangOpts().OpenMP || getLangOpts().OpenMP < 60) {
     Diag(Loc, diag::err_omp_unexpected_directive)
-        << getOpenMPDirectiveName(OMPD_groupprivate, getLangOpts().OpenMP);
+        << 1 << getOpenMPDirectiveName(OMPD_groupprivate, getLangOpts().OpenMP);
     return nullptr;
   }
   if (OMPGroupPrivateDecl *D = CheckOMPGroupPrivateDecl(Loc, VarList)) {



More information about the cfe-commits mailing list