================ @@ -3445,30 +3451,27 @@ SemaOpenMP::DeclGroupPtrTy SemaOpenMP::ActOnOpenMPAllocateDirective( else llvm_unreachable("Unexpected clause on allocate directive"); } + // No forward-decl needed; just classify with null-guards. OMPAllocateDeclAttr::AllocatorTypeTy AllocatorKind = getAllocatorKind(SemaRef, DSAStack, Allocator); SmallVector<Expr *, 8> Vars; for (Expr *RefExpr : VarList) { auto *DE = cast<DeclRefExpr>(RefExpr); auto *VD = cast<VarDecl>(DE->getDecl()); - // Check if this is a TLS variable or global register. + // Skip TLS/global-registers. if (VD->getTLSKind() != VarDecl::TLS_None || VD->hasAttr<OMPThreadPrivateDeclAttr>() || (VD->getStorageClass() == SC_Register && VD->hasAttr<AsmLabelAttr>() && !VD->isLocalVarDecl())) continue; - // If the used several times in the allocate directive, the same allocator - // must be used. + // Enforce same allocator if repeated. ---------------- shafik wrote:
The previous comment is more helpful, please keep it. https://github.com/llvm/llvm-project/pull/158146 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits