================
@@ -14924,8 +14924,25 @@ StmtResult 
SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef<OMPClause *> Clauses,
   SourceLocation FactorLoc;
   if (Expr *FactorVal = PartialClause->getFactor();
       FactorVal && !FactorVal->containsErrors()) {
+    if (!VerifyPositiveIntegerConstantInClause(FactorVal, OMPC_partial,
+                                               /*StrictlyPositive=*/true,
+                                               /*SuppressExprDiags=*/false)
+             .isUsable()) {
+      return StmtError();
+    }
+    // Checking if Iterator Variable Type can hold the Factor Width
+    auto FactorValWidth = 
FactorVal->getIntegerConstantExpr(Context)->getActiveBits();
+    auto IteratorVWidth = Context.getTypeSize(OrigVar->getType());
----------------
shiltian wrote:

no auto

https://github.com/llvm/llvm-project/pull/139986
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to