================
@@ -2361,6 +2361,99 @@ static bool DiagnoseHLSLRegisterAttribute(Sema &S,
SourceLocation &ArgLoc,
return ValidateMultipleRegisterAnnotations(S, D, RegType);
}
+bool ExceedsUInt32Max(llvm::StringRef S) {
+ constexpr size_t MaxDigits = 10; // UINT32_MAX = 4294967295
+ if (S.size() > MaxDigits)
+ return true;
+
+ if (S.size() < MaxDigits)
+ return false;
----------------
bob80905 wrote:
See the response to your comment: I'm wondering why we need to do the tests
against the string version rather than just against the APInt one?
https://github.com/llvm/llvm-project/pull/174028
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits