[PATCH] D60568: [OpenMP] Add support for registering requires directives with the runtime

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 18 07:37:00 PDT 2019


ABataev added inline comments.


================
Comment at: lib/Sema/SemaOpenMP.cpp:476
+           isa<OMPDynamicAllocatorsClause>(CNew))) {
+        SemaRef.Diag(Loc,
+                     diag::err_omp_target_before_requires)
----------------
gtbercea wrote:
> ABataev wrote:
> > DSAStack usually is not used for diagnostic emission, it serves as the container. Better to move the diagnostics to Act... functions.
> The "bool hasDuplicateRequiresClause(ArrayRef<OMPClause *> ClauseList) const {" function works in a similar function as this one and does emit diagnostics. See a few lines above.
> 
> I need to iterate through a private member of DSAStack so I don't see how that can be in any other place than in DSAStack.
1. `hasDuplicateRequiresClause` must be fixed.
2. You can return ArrayRef<SourceLocation> and iterate over it in the Act.. function


Repository:
  rC Clang

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

https://reviews.llvm.org/D60568





More information about the cfe-commits mailing list