[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-21 Thread Jonas Hahnfeld via Phabricator via cfe-commits
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

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-21 Thread Alexey Bataev via Phabricator via cfe-commits
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

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-20 Thread Jonas Hahnfeld via Phabricator via cfe-commits
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:

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-20 Thread Alexey Bataev via Phabricator via cfe-commits
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,

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-20 Thread Jonas Hahnfeld via Phabricator via cfe-commits
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,

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-20 Thread Alexey Bataev via Phabricator via cfe-commits
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

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-20 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:1959 +static bool CheckCancelRegion(Sema , OpenMPDirectiveKind CurrentRegion, + OpenMPDirectiveKind CancelRegion, ABataev wrote: > Should be `checkCancelRegion`

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:1959 +static bool CheckCancelRegion(Sema , OpenMPDirectiveKind CurrentRegion, + OpenMPDirectiveKind CancelRegion, Should be `checkCancelRegion`

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-20 Thread Jonas Hahnfeld via Phabricator via cfe-commits
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

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-20 Thread Alexey Bataev via Phabricator via cfe-commits
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

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-20 Thread Jonas Hahnfeld via Phabricator via cfe-commits
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?

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-20 Thread Alexey Bataev via Phabricator via cfe-commits
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 ___

[PATCH] D30135: [OpenMP] Generate better diagnostics for cancel and cancellation point

2017-02-18 Thread Jonas Hahnfeld via Phabricator via cfe-commits
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