This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP 5.2] Deprecate 'destroy' clause without argument for 'depobj' construct
ClosedPublic

Authored by mdfazlay on Jan 31 2023, 3:00 PM.

Details

Summary

Deprecate and diagnose uses of the 'destroy' clauses without an argument in 'omp depobj' directives.

Note that an error is given for deprecated features (rather than a warning).

Reference:
(1) OpenMP 5.2 Sepec: Section 3.5, Page 73
(2) OpenMP 5.2 spec: Sec B.2 line 13, Page 626

Diff Detail

Event Timeline

mdfazlay created this revision.Jan 31 2023, 3:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 3:00 PM
mdfazlay requested review of this revision.Jan 31 2023, 3:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 3:00 PM
ABataev added inline comments.Feb 1 2023, 6:22 AM
clang/include/clang/Basic/DiagnosticParseKinds.td
496
  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.
clang/lib/Sema/SemaOpenMP.cpp
17666

Can it be used with any other directive except for depobj?

mdfazlay updated this revision to Diff 494415.Feb 2 2023, 12:46 PM

Updated the diff. Please take a look.

clang/include/clang/Basic/DiagnosticParseKinds.td
496

Done :)

clang/lib/Sema/SemaOpenMP.cpp
17666

I tried to make it more general. Please take a look.

ABataev added inline comments.Feb 2 2023, 2:09 PM
clang/include/clang/Basic/DiagnosticParseKinds.td
1378

We do not use OpenMP versions in messages.

clang/lib/Sema/SemaOpenMP.cpp
17665–17666

You can drop some parens inside condition

mdfazlay updated this revision to Diff 495196.Feb 6 2023, 10:06 AM

@ABataev, I have addressed your last two comments and updated the diff. Please take a look at your convenient time :)

This revision is now accepted and ready to land.Feb 6 2023, 10:24 AM