[PATCH] D143021: [OpenMP 5.2] Deprecate 'destroy' clause without argument for 'depobj' construct

Fazlay Rabbi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 2 12:47:05 PST 2023


mdfazlay added a comment.

Updated the diff. Please take a look.



================
Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:496
 
+def err_destroy_clause_without_argument
+    : Error<"'destroy' clause without argument on '#pragma omp depobj' "
----------------
ABataev wrote:
> 1. Usually we name them err_omp_... Also, move to other err_omp messages.
> 2. Better to use something like "Expected depobj with argument if destroy clause is specified" or something like this.
Done :)


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:17666
+  if (!InteropVar && (LangOpts.OpenMP >= 52 &&
+                      DSAStack->getCurrentDirective() == OMPD_depobj)) {
+    Diag(StartLoc, diag::err_destroy_clause_without_argument);
----------------
ABataev wrote:
> Can it be used with any other directive except for depobj?
I tried to make it more general. Please take a look.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143021/new/

https://reviews.llvm.org/D143021



More information about the cfe-commits mailing list