================
@@ -6180,10 +6180,13 @@ static void handleLaunchBoundsAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
AL.getNumArgs() > 2 ? AL.getArgAsExpr(2) : nullptr);
}
-static std::pair<Expr *, int>
+static std::pair<Expr *, uint64_t>
----------------
petar-jovanovic wrote:
If we use a 5-bit bound, values above 31 will fail here and we will report
`cannot be represented in a 5-bit unsigned integer type`
yet, this way we report IMHO the more useful
`cluster does not support more than 16 thread blocks; N provided`
Otherwise, e.g. `cluster_dims(32, 2, 4) ` will never reach the cluster-size
check and we will lose the diagnostic this patch is intended to restore.
This way, we get (nice) error report:
`"cluster does not support more than 16 thread blocks; 256 provided".`
https://github.com/llvm/llvm-project/pull/230186
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits