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

Michael Klemm via flang-commits flang-commits at lists.llvm.org
Tue Jul 16 15:20:21 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.";
----------------
mjklemm wrote:

```suggestion
    warnStr = "OpenMP directive '" + dirName +
        "' has been deprecated, please use 'masked' instead.";
```

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


More information about the flang-commits mailing list