|
@@ -776,12 +776,12 @@ static void rewriteToNSMacroDecl(ASTContext &Ctx,
|
|
|
const TypedefDecl *TypedefDcl,
|
|
|
const NSAPI &NS, edit::Commit &commit,
|
|
|
bool IsNSIntegerType) {
|
|
|
- QualType EnumUnderlyingT = EnumDcl->getPromotionType();
|
|
|
- assert(!EnumUnderlyingT.isNull()
|
|
|
+ QualType DesignatedEnumType = EnumDcl->getIntegerType();
|
|
|
+ assert(!DesignatedEnumType.isNull()
|
|
|
&& "rewriteToNSMacroDecl - underlying enum type is null");
|
|
|
|
|
|
PrintingPolicy Policy(Ctx.getPrintingPolicy());
|
|
|
- std::string TypeString = EnumUnderlyingT.getAsString(Policy);
|
|
|
+ std::string TypeString = DesignatedEnumType.getAsString(Policy);
|
|
|
std::string ClassString = IsNSIntegerType ? "NS_ENUM(" : "NS_OPTIONS(";
|
|
|
ClassString += TypeString;
|
|
|
ClassString += ", ";
|