[flang-commits] [flang] Adding warning for Master as it is deprecated in 5.2 (PR #98955)

Anchu Rajendran S via flang-commits flang-commits at lists.llvm.org
Mon Jul 22 07:20:41 PDT 2024


================
@@ -2758,4 +2758,22 @@ void OmpAttributeVisitor::AddOmpRequiresToScope(Scope &scope,
   } while (!scopeIter->IsGlobal());
 }
 
+void OmpAttributeVisitor::IssueNonConformanceWarning(
+    llvm::omp::Directive D, parser::CharBlock source) {
+  std::string warnStr = "";
+  std::string dirName = llvm::omp::getOpenMPDirectiveName(D).str();
+  switch (D) {
+  case llvm::omp::OMPD_master:
+    warnStr = "OpenMP directive " + dirName +
+        " has been deprecated, please use masked instead.";
+    break;
+  case llvm::omp::OMPD_target_loop:
+  default:
+    warnStr = "Usage of directive " + dirName +
+        "is non-confirming to OpenMP standard.";
----------------
anchuraj wrote:

Sure. Thank you! 

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


More information about the flang-commits mailing list