diff options
author | Tom Eccles <tom.eccles@arm.com> | 2025-06-26 14:09:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-26 14:09:21 +0100 |
commit | cc1eae6ea2de5ccadb81a182b9f0de2128b9fefc (patch) | |
tree | d9bc193725507a43bea0567dcd9ebd24a762aff6 /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 6a5469bb815d2e2712b635984eb479a67f37be9b (diff) | |
download | llvm-cc1eae6ea2de5ccadb81a182b9f0de2128b9fefc.zip llvm-cc1eae6ea2de5ccadb81a182b9f0de2128b9fefc.tar.gz llvm-cc1eae6ea2de5ccadb81a182b9f0de2128b9fefc.tar.bz2 |
[flang][OpenMP] Remove experimental warning (#144915)
RFC:
https://discourse.llvm.org/t/rfc-removing-the-openmp-experimental-warning-for-llvm-21/86455
Fixes: #110008
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 07d6814..766131f 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -1138,8 +1138,9 @@ static bool parseOpenMPArgs(CompilerInvocation &res, llvm::opt::ArgList &args, unsigned numErrorsBefore = diags.getNumErrors(); llvm::Triple t(res.getTargetOpts().triple); - // By default OpenMP is set to 3.1 version - res.getLangOpts().OpenMPVersion = 31; + constexpr unsigned newestFullySupported = 31; + // By default OpenMP is set to the most recent fully supported version + res.getLangOpts().OpenMPVersion = newestFullySupported; res.getFrontendOpts().features.Enable( Fortran::common::LanguageFeature::OpenMP); if (auto *arg = @@ -1164,6 +1165,9 @@ static bool parseOpenMPArgs(CompilerInvocation &res, llvm::opt::ArgList &args, if (!value.getAsInteger(/*radix=*/10, version)) { if (llvm::is_contained(ompVersions, version)) { res.getLangOpts().OpenMPVersion = version; + + if (version > newestFullySupported) + diags.Report(clang::diag::warn_openmp_incomplete) << version; } else if (llvm::is_contained(oldVersions, version)) { const unsigned diagID = diags.getCustomDiagID(clang::DiagnosticsEngine::Warning, |