This revision was automatically updated to reflect the committed changes.
Closed by commit rL295808: [OpenMP] Generate better diagnostics for cancel and
cancellation point (authored by Hahnfeld).
Changed prior to commit:
https://reviews.llvm.org/D30135?vs=89106=89326#toc
Repository:
rL LLVM
ABataev accepted this revision.
ABataev added a comment.
This revision is now accepted and ready to land.
LG
https://reviews.llvm.org/D30135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
Hahnfeld updated this revision to Diff 89106.
Hahnfeld marked 3 inline comments as done.
Hahnfeld edited the summary of this revision.
Hahnfeld added a comment.
Address review comment's and apply new naming style to checkNestingOfRegions
https://reviews.llvm.org/D30135
Files:
ABataev added inline comments.
Comment at: lib/Sema/SemaOpenMP.cpp:1968-1973
+ if (CancelRegion != OMPD_parallel && CancelRegion != OMPD_for &&
+ CancelRegion != OMPD_sections && CancelRegion != OMPD_taskgroup) {
+SemaRef.Diag(StartLoc,
Hahnfeld added inline comments.
Comment at: lib/Sema/SemaOpenMP.cpp:1968-1973
+ if (CancelRegion != OMPD_parallel && CancelRegion != OMPD_for &&
+ CancelRegion != OMPD_sections && CancelRegion != OMPD_taskgroup) {
+SemaRef.Diag(StartLoc,
ABataev added inline comments.
Comment at: lib/Sema/SemaOpenMP.cpp:1959
+static bool CheckCancelRegion(Sema , OpenMPDirectiveKind CurrentRegion,
+ OpenMPDirectiveKind CancelRegion,
Hahnfeld wrote:
> ABataev wrote:
> > Should be
Hahnfeld added inline comments.
Comment at: lib/Sema/SemaOpenMP.cpp:1959
+static bool CheckCancelRegion(Sema , OpenMPDirectiveKind CurrentRegion,
+ OpenMPDirectiveKind CancelRegion,
ABataev wrote:
> Should be `checkCancelRegion`
ABataev added inline comments.
Comment at: lib/Sema/SemaOpenMP.cpp:1959
+static bool CheckCancelRegion(Sema , OpenMPDirectiveKind CurrentRegion,
+ OpenMPDirectiveKind CancelRegion,
Should be `checkCancelRegion`
Hahnfeld updated this revision to Diff 89099.
Hahnfeld edited the summary of this revision.
Hahnfeld added a comment.
new static function `CheckCancelRegion`
https://reviews.llvm.org/D30135
Files:
lib/Sema/SemaOpenMP.cpp
test/OpenMP/cancel_messages.cpp
ABataev added a comment.
I see. I think it is better to check the `CancelRegion` just before call of
`CheckNestingOfRegions()` function. You need to extract checks for
`CancelRegion` from `ActOnOpenMPCancellationPointDirective()` and
`ActOnOpenMPCancelDirective()` functions into a standalone
Hahnfeld added a comment.
In https://reviews.llvm.org/D30135#681354, @ABataev wrote:
> Not sure that this is better because at first, we need to be sure that this
> nesting is allowed. Why do we need to perform some additional analysis if
> nesting is not allowed at all?
ABataev added a comment.
Not sure that this is better because at first, we need to be sure that this
nesting is allowed. Why do we need to perform some additional analysis if
nesting is not allowed at all?
https://reviews.llvm.org/D30135
___
Hahnfeld created this revision.
Handle errors related to a specific directive before checking the nesting:
The specific checks may validate required arguments and give more helpful
messages, especially when the nesting depends on those arguments.
This change requires some minor adaptions to the
13 matches
Mail list logo