================
@@ -14924,8 +14924,24 @@ 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 Itertor Variable Type can hold the Factor Width
+ if (FactorVal->getIntegerConstantExpr(Context)->getBitWidth() >
----------------
albus-droid wrote:
I created two local variables `FactorValWidth` and `IteratorVWidth` to use in
both places.
https://github.com/llvm/llvm-project/pull/139986
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits