================ @@ -5910,6 +5910,30 @@ static void handleBuiltinAliasAttr(Sema &S, Decl *D, D->addAttr(::new (S.Context) BuiltinAliasAttr(S.Context, AL, Ident)); } +static void handleDebugInfoTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + if (!AL.hasParsedType()) { + S.Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments) << AL << 1; + return; + } + + TypeSourceInfo *ParmTSI = nullptr; + QualType type = S.GetTypeFromParser(AL.getTypeArg(), &ParmTSI); + assert(ParmTSI && "no type source info for attribute argument"); + + if (type->isEnumeralType()) { + QualType BitfieldType = llvm::cast<FieldDecl>(D)->getType(); + QualType EnumUnderlyingType = + type->getAs<EnumType>()->getDecl()->getIntegerType(); + if (EnumUnderlyingType != BitfieldType) { ---------------- Endilll wrote:
We don't really care about the underlying type compiler deduced, right? We just shove them into unsigned bit-fields. All the more reason to move towards fixed underlying type, I believe. https://github.com/llvm/llvm-project/pull/69104 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits