[PATCH] D150291: [Clang] Rename internal type identifier(s) for `__bf16` to `BF16Ty`

Tom Honermann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 10 16:06:28 PDT 2023


tahonermann requested changes to this revision.
tahonermann added a comment.
This revision now requires changes to proceed.

This looks great, thank you for doing this!

Requested changes are just to undo some of the style changes.



================
Comment at: clang/include/clang/Basic/Specifiers.h:82-89
+    TST_class,             // C++ class type
+    TST_interface,         // C++ (Microsoft-specific) __interface type
+    TST_typename,          // Typedef, C++ class-name or enum name, etc.
     TST_typeofType,        // C2x (and GNU extension) typeof(type-name)
     TST_typeofExpr,        // C2x (and GNU extension) typeof(expression)
     TST_typeof_unqualType, // C2x typeof_unqual(type-name)
     TST_typeof_unqualExpr, // C2x typeof_unqual(expression)
----------------
Whitespace changes to code that is otherwise not being changed are discouraged due to the impact on tools like `git blame`. If you want to make such a change, please do so as a separate commit and add the commit to `.git-blame-ignore-revs`.


================
Comment at: clang/lib/AST/ASTContext.cpp:7075-7076
   case BuiltinType::Float128:   return Float128Rank;
-  case BuiltinType::BFloat16:   return BFloat16Rank;
+  case BuiltinType::BF16:
+    return BF16Rank;
   case BuiltinType::Ibm128:     return Ibm128Rank;
----------------
Please keep the same style here (I know `clang-format` might want to do differently; just ignore it in this case).


================
Comment at: clang/lib/AST/ItaniumMangle.cpp:3617-3619
+    case BuiltinType::BF16:
+      EltName = "bfloat16_t";
+      break;
----------------
Likewise, please maintain consistent style here.

Thank you for *not* changing the literal! :)


================
Comment at: clang/lib/Sema/DeclSpec.cpp:590-591
   case DeclSpec::TST_atomic: return "_Atomic";
-  case DeclSpec::TST_BFloat16: return "__bf16";
+  case DeclSpec::TST_BF16:
+    return "__bf16";
 #define GENERIC_IMAGE_TYPE(ImgType, Id) \
----------------
Please maintain consistent style here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150291/new/

https://reviews.llvm.org/D150291



More information about the cfe-commits mailing list