]> granicus.if.org Git - clang/commitdiff
[OPENMP]Add missing comment, NFC.
authorAlexey Bataev <a.bataev@hotmail.com>
Fri, 22 Mar 2019 15:32:02 +0000 (15:32 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Fri, 22 Mar 2019 15:32:02 +0000 (15:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356759 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOpenMP.cpp

index 51e0dafbbc55221eefdcc46e894fd295d1e9a513..f541d75ce5e6942b759e6a8f180921b602bec79d 100644 (file)
@@ -2254,6 +2254,10 @@ Sema::DeclGroupPtrTy Sema::ActOnOpenMPAllocateDirective(
   assert(Clauses.size() <= 1 && "Expected at most one clause.");
   Expr *Allocator = nullptr;
   if (Clauses.empty()) {
+    // OpenMP 5.0, 2.11.3 allocate Directive, Restrictions.
+    // allocate directives that appear in a target region must specify an
+    // allocator clause unless a requires directive with the dynamic_allocators
+    // clause is present in the same compilation unit.
     if (LangOpts.OpenMPIsDevice &&
         !DSAStack->hasRequiresDeclWithClause<OMPDynamicAllocatorsClause>())
       targetDiag(Loc, diag::err_expected_allocator_clause);