[PATCH] D78577: [OPENMP50]Basic support for uses_allocators clause.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 30 12:21:16 PDT 2020


ABataev marked 5 inline comments as done.
ABataev added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:18614
+      if (DRE)
+        IsPredefinedAllocator = PredefinedAllocators.count(DRE->getDecl());
+      if (!DRE ||
----------------
jdoerfert wrote:
> Nit: I guess after the condition below these three lines can be placed as `bool IsPredefinedAllocator = PredefinedAllocators.count(DRE->getDecl());`
`IsPredefinedAllocator` is used in the condition itself


================
Comment at: clang/test/OpenMP/target_uses_allocators_messages.cpp:54
+}
+
----------------
jdoerfert wrote:
> Do we handle/test the case where the trait array is empty?
> 
> ```
> omp_alloctrait_t empty_traits[0];
> ```
> I guess that doesn't mean much and we should error out?
Runtime supports it, returns default allocator in this case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78577





More information about the cfe-commits mailing list