================
@@ -23730,14 +23730,14 @@ ProcessOpenMPDoacrossClauseCommon(Sema &SemaRef, bool 
IsSource,
 
   SmallVector<Expr *, 8> Vars;
   DSAStackTy::OperatorOffsetTy OpsOffs;
-  llvm::APSInt DepCounter(/*BitWidth=*/32);
   llvm::APSInt TotalDepCount(/*BitWidth=*/32);
 
   if (const Expr *OrderedCountExpr =
           Stack->getParentOrderedRegionParam().first) {
     TotalDepCount = OrderedCountExpr->EvaluateKnownConstInt(SemaRef.Context);
     TotalDepCount.setIsUnsigned(/*Val=*/true);
   }
+  llvm::APSInt DepCounter(TotalDepCount.getBitWidth());
----------------
ipranjalks wrote:

I feel that we can't remove the `setIsUnsigned()` call because the value of 
`TotalDepCount` changes inside the `if` condition, post which we need to set it 
back to `Unsigned`.

```
TotalDepCount = OrderedCountExpr->EvaluateKnownConstInt(SemaRef.Context);
TotalDepCount.setIsUnsigned(/*Val=*/true);
```

I can definitely pass the `isUnsigned = true` in the constructor though.

https://github.com/llvm/llvm-project/pull/238672
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to