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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to