================
@@ -380,27 +376,41 @@ enum CFNumberType {
 };
 
 static std::optional<uint64_t> GetCFNumberSize(ASTContext &Ctx, uint64_t i) {
-  static const unsigned char FixedSize[] = { 8, 16, 32, 64, 32, 64 };
+  static const unsigned char FixedSize[] = {8, 16, 32, 64, 32, 64};
 
   if (i < kCFNumberCharType)
-    return FixedSize[i-1];
+    return FixedSize[i - 1];
 
   QualType T;
 
   switch (i) {
-    case kCFNumberCharType:     T = Ctx.CharTy;     break;
-    case kCFNumberShortType:    T = Ctx.ShortTy;    break;
-    case kCFNumberIntType:      T = Ctx.IntTy;      break;
-    case kCFNumberLongType:     T = Ctx.LongTy;     break;
-    case kCFNumberLongLongType: T = Ctx.LongLongTy; break;
-    case kCFNumberFloatType:    T = Ctx.FloatTy;    break;
-    case kCFNumberDoubleType:   T = Ctx.DoubleTy;   break;
-    case kCFNumberCFIndexType:
-    case kCFNumberNSIntegerType:
-    case kCFNumberCGFloatType:
-      // FIXME: We need a way to map from names to Type*.
-    default:
-      return std::nullopt;
+  case kCFNumberCharType:
+    T = Ctx.CharTy;
+    break;
+  case kCFNumberShortType:
+    T = Ctx.ShortTy;
+    break;
+  case kCFNumberIntType:
+    T = Ctx.IntTy;
+    break;
+  case kCFNumberLongType:
+    T = Ctx.LongTy;
+    break;
+  case kCFNumberLongLongType:
+    T = Ctx.LongLongTy;
+    break;
+  case kCFNumberFloatType:
+    T = Ctx.FloatTy;
+    break;
+  case kCFNumberDoubleType:
+    T = Ctx.DoubleTy;
+    break;
+  case kCFNumberCFIndexType:
+  case kCFNumberNSIntegerType:
+  case kCFNumberCGFloatType:
+    // FIXME: We need a way to map from names to Type*.
+  default:
+    return std::nullopt;
----------------
steakhal wrote:

```suggestion
    // clang-format off
    case kCFNumberCharType:     T = Ctx.CharTy;     break;
    case kCFNumberShortType:    T = Ctx.ShortTy;    break;
    case kCFNumberIntType:      T = Ctx.IntTy;      break;
    case kCFNumberLongType:     T = Ctx.LongTy;     break;
    case kCFNumberLongLongType: T = Ctx.LongLongTy; break;
    case kCFNumberFloatType:    T = Ctx.FloatTy;    break;
    case kCFNumberDoubleType:   T = Ctx.DoubleTy;   break;
    case kCFNumberCFIndexType:
    case kCFNumberNSIntegerType:
    case kCFNumberCGFloatType:
      // FIXME: We need a way to map from names to Type*.
    default:
      return std::nullopt;
    // clang-format on
```

https://github.com/llvm/llvm-project/pull/82599
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to