Marius =?utf-8?q?Dörner?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -5186,8 +5186,9 @@ class Sema final : public SemaBase {
return false;
}
- unsigned IdxSource = IdxInt->getLimitedValue(UINT_MAX);
- if (IdxSource < 1 ||
+ constexpr unsigned Limit = 1 << ParamIdx::IdxBitWidth;
+ unsigned IdxSource = IdxInt->getLimitedValue(Limit);
+ if (IdxSource < 1 || IdxSource == Limit ||
----------------
mariusdr wrote:
`getLimitedValue` is required in any way to get the unsigned value out of the
`APSInt` instance, so I thought I just make use of the limit.
https://github.com/llvm/llvm-project/pull/180424
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits