================
@@ -59,6 +61,21 @@ OptionalAmount 
clang::analyze_format_string::ParseAmount(const char *&Beg,
   return OptionalAmount();
 }
 
+static bool ParseWidthModifier(const char *&I, const char *E,
+                               unsigned &BitWidth, unsigned &ModifierLength) {
+  StringRef W = StringRef(I, E - I).take_while(llvm::isDigit);
+  if (W.empty() || W.front() == '0')
+    return false;
+
+  if (W.getAsInteger(10, BitWidth))
+    BitWidth = std::numeric_limits<unsigned>::max();
----------------
AaronBallman wrote:

Should this be a `returns false` situation instead?

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

Reply via email to