[clang] [compiler-rt] [ubsan] Improve scoped enum diagnostic printer (PR #216460)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 17:46:05 PDT 2026


================
@@ -3959,6 +3959,14 @@ llvm::Constant *CodeGenFunction::EmitCheckTypeDescriptor(QualType T) {
   uint16_t TypeInfo = 0;
   bool IsBitInt = false;
 
+  // isIntegerType() never holds for scoped enums, and getAs<BitIntType> can't
+  // see through the EnumType node to a __BitInt underlying type even for
+  // unscoped enums.
+  QualType BackupT = T;
----------------
zebullax wrote:

Previous reviewer had a somewhat opposite preference, in the end the current naming does make sense and yields minimal change, so Im fairly happy as is unless strong push back.

https://github.com/llvm/llvm-project/pull/216460


More information about the llvm-commits mailing list