$OpenBSD: patch-tools_clang_include_clang_AST_FormatString_h,v 1.4 2021/05/18 03:35:07 rsadowski Exp $

- The %b printf extension in the kernel is not fixed to a int type. On sparc64
  there are various %llb formats. Adjust the code to handle the length specifiers
  and type check like it is used by the regular case.

Index: tools/clang/include/clang/AST/FormatString.h
--- tools/clang/include/clang/AST/FormatString.h.orig
+++ tools/clang/include/clang/AST/FormatString.h
@@ -227,8 +227,10 @@ class ConversionSpecifier { (public)
 
   bool isIntArg() const { return (kind >= IntArgBeg && kind <= IntArgEnd) ||
     kind == FreeBSDrArg || kind == FreeBSDyArg; }
-  bool isUIntArg() const { return kind >= UIntArgBeg && kind <= UIntArgEnd; }
-  bool isAnyIntArg() const { return kind >= IntArgBeg && kind <= UIntArgEnd; }
+  bool isUIntArg() const { return (kind >= UIntArgBeg && kind <= UIntArgEnd) ||
+    kind == FreeBSDbArg; }
+  bool isAnyIntArg() const { return (kind >= IntArgBeg && kind <= UIntArgEnd) ||
+    kind == FreeBSDbArg; }
   bool isDoubleArg() const {
     return kind >= DoubleArgBeg && kind <= DoubleArgEnd;
   }
