Lines Matching refs:ECD
14576 static bool ValidDuplicateEnum(EnumConstantDecl *ECD, EnumDecl *Enum) { in ValidDuplicateEnum() argument
14577 Expr *InitExpr = ECD->getInitExpr(); in ValidDuplicateEnum()
14603 if (cast<EnumDecl>(TagDecl::castFromDeclContext(ECD->getDeclContext())) != in ValidDuplicateEnum()
14664 EnumConstantDecl *ECD = cast_or_null<EnumConstantDecl>(Elements[i]); in CheckForDuplicateEnumValues() local
14668 if (!ECD) { in CheckForDuplicateEnumValues()
14672 if (ECD->getInitExpr()) in CheckForDuplicateEnumValues()
14675 DupKey Key = GetDupKey(ECD->getInitVal()); in CheckForDuplicateEnumValues()
14680 Entry = ECD; in CheckForDuplicateEnumValues()
14685 EnumConstantDecl *ECD = cast<EnumConstantDecl>(Elements[i]); in CheckForDuplicateEnumValues() local
14686 if (!ValidDuplicateEnum(ECD, Enum)) in CheckForDuplicateEnumValues()
14689 DupKey Key = GetDupKey(ECD->getInitVal()); in CheckForDuplicateEnumValues()
14697 if (D == ECD) in CheckForDuplicateEnumValues()
14703 Vec->push_back(ECD); in CheckForDuplicateEnumValues()
14716 if (*Vec->begin() == ECD) in CheckForDuplicateEnumValues()
14719 Vec->push_back(ECD); in CheckForDuplicateEnumValues()
14787 EnumConstantDecl *ECD = in ActOnEnumBody() local
14789 if (!ECD) continue; in ActOnEnumBody()
14791 ECD->setType(EnumType); in ActOnEnumBody()
14814 EnumConstantDecl *ECD = in ActOnEnumBody() local
14816 if (!ECD) continue; // Already issued a diagnostic. in ActOnEnumBody()
14818 const llvm::APSInt &InitVal = ECD->getInitVal(); in ActOnEnumBody()
14830 AllElementsInt = ECD->getType() == Context.IntTy; in ActOnEnumBody()
14929 auto *ECD = cast_or_null<EnumConstantDecl>(D); in ActOnEnumBody() local
14930 if (!ECD) continue; // Already issued a diagnostic. in ActOnEnumBody()
14939 llvm::APSInt InitVal = ECD->getInitVal(); in ActOnEnumBody()
14952 } else if (ECD->getType() == BestType) { in ActOnEnumBody()
14958 ECD->setType(EnumType); in ActOnEnumBody()
14969 ECD->setInitVal(InitVal); in ActOnEnumBody()
14972 if (ECD->getInitExpr() && in ActOnEnumBody()
14973 !Context.hasSameType(NewTy, ECD->getInitExpr()->getType())) in ActOnEnumBody()
14974 ECD->setInitExpr(ImplicitCastExpr::Create(Context, NewTy, in ActOnEnumBody()
14976 ECD->getInitExpr(), in ActOnEnumBody()
14983 ECD->setType(EnumType); in ActOnEnumBody()
14985 ECD->setType(NewTy); in ActOnEnumBody()
14995 EnumConstantDecl *ECD = cast_or_null<EnumConstantDecl>(D); in ActOnEnumBody() local
14996 if (!ECD) continue; // Already issued a diagnostic. in ActOnEnumBody()
14998 llvm::APSInt InitVal = ECD->getInitVal(); in ActOnEnumBody()
15001 Diag(ECD->getLocation(), diag::warn_flag_enum_constant_out_of_range) in ActOnEnumBody()
15002 << ECD << Enum; in ActOnEnumBody()