================
@@ -5010,6 +4932,37 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind 
DKind,
       ConsumeToken();
       if (Tok.is(tok::colon))
         Data.ColonLoc = Tok.getLocation();
+      if (getLangOpts().OpenMP >= 61) {
+        // Handle optional need_device_ptr modifier.
+        if (Tok.is(tok::l_paren)) {
+          BalancedDelimiterTracker T(*this, tok::l_paren);
+          T.consumeOpen();
+          if (Tok.is(tok::identifier)) {
+            std::string Modifier = PP.getSpelling(Tok);
+            if (Modifier == "fb_nullify" || Modifier == "fb_preserve") {
+              Data.NeedDevicePtrModifier = Modifier == "fb_nullify"
+                                               ? OMPC_NEEDDEVICE_fp_nullify
+                                               : OMPC_NEEDDEVICE_fp_preserve;
+            } else {
+              Diag(Tok, diag::err_omp_unknown_need_device_ptr_modifier)
+                  << (getLangOpts().OpenMP >= 60 ? 1 : 0);
----------------
zahiraam wrote:

Remove that part of the diagnostic.

https://github.com/llvm/llvm-project/pull/168905
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to