Lines Matching refs:ECD
9308 if (auto *ECD = dyn_cast<EnumConstantDecl>(NonParmDecl)) in ActOnFunctionDeclarator() local
9309 TD = cast<EnumDecl>(ECD->getDeclContext()); in ActOnFunctionDeclarator()
17825 static bool ValidDuplicateEnum(EnumConstantDecl *ECD, EnumDecl *Enum) { in ValidDuplicateEnum() argument
17826 Expr *InitExpr = ECD->getInitExpr(); in ValidDuplicateEnum()
17852 if (cast<EnumDecl>(TagDecl::castFromDeclContext(ECD->getDeclContext())) != in ValidDuplicateEnum()
17894 EnumConstantDecl *ECD = cast_or_null<EnumConstantDecl>(Element); in CheckForDuplicateEnumValues() local
17898 if (!ECD) { in CheckForDuplicateEnumValues()
17903 if (ECD->getInitExpr()) in CheckForDuplicateEnumValues()
17907 EnumMap.insert({EnumConstantToKey(ECD), ECD}); in CheckForDuplicateEnumValues()
17916 EnumConstantDecl *ECD = cast<EnumConstantDecl>(Element); in CheckForDuplicateEnumValues() local
17917 if (!ValidDuplicateEnum(ECD, Enum)) in CheckForDuplicateEnumValues()
17920 auto Iter = EnumMap.find(EnumConstantToKey(ECD)); in CheckForDuplicateEnumValues()
17927 if (D == ECD) in CheckForDuplicateEnumValues()
17933 Vec->push_back(ECD); in CheckForDuplicateEnumValues()
17946 if (*Vec->begin() == ECD) in CheckForDuplicateEnumValues()
17949 Vec->push_back(ECD); in CheckForDuplicateEnumValues()
17964 for (auto *ECD : llvm::make_range(Vec->begin() + 1, Vec->end())) in CheckForDuplicateEnumValues() local
17965 S.Diag(ECD->getLocation(), diag::note_duplicate_element) in CheckForDuplicateEnumValues()
17966 << ECD << ECD->getInitVal().toString(10) in CheckForDuplicateEnumValues()
17967 << ECD->getSourceRange(); in CheckForDuplicateEnumValues()
18010 EnumConstantDecl *ECD = in ActOnEnumBody() local
18012 if (!ECD) continue; in ActOnEnumBody()
18014 ECD->setType(EnumType); in ActOnEnumBody()
18037 EnumConstantDecl *ECD = in ActOnEnumBody() local
18039 if (!ECD) continue; // Already issued a diagnostic. in ActOnEnumBody()
18041 const llvm::APSInt &InitVal = ECD->getInitVal(); in ActOnEnumBody()
18053 AllElementsInt = ECD->getType() == Context.IntTy; in ActOnEnumBody()
18154 auto *ECD = cast_or_null<EnumConstantDecl>(D); in ActOnEnumBody() local
18155 if (!ECD) continue; // Already issued a diagnostic. in ActOnEnumBody()
18164 llvm::APSInt InitVal = ECD->getInitVal(); in ActOnEnumBody()
18177 } else if (ECD->getType() == BestType) { in ActOnEnumBody()
18183 ECD->setType(EnumType); in ActOnEnumBody()
18194 ECD->setInitVal(InitVal); in ActOnEnumBody()
18197 if (ECD->getInitExpr() && in ActOnEnumBody()
18198 !Context.hasSameType(NewTy, ECD->getInitExpr()->getType())) in ActOnEnumBody()
18199 ECD->setInitExpr(ImplicitCastExpr::Create( in ActOnEnumBody()
18200 Context, NewTy, CK_IntegralCast, ECD->getInitExpr(), in ActOnEnumBody()
18206 ECD->setType(EnumType); in ActOnEnumBody()
18208 ECD->setType(NewTy); in ActOnEnumBody()
18218 EnumConstantDecl *ECD = cast_or_null<EnumConstantDecl>(D); in ActOnEnumBody() local
18219 if (!ECD) continue; // Already issued a diagnostic. in ActOnEnumBody()
18221 llvm::APSInt InitVal = ECD->getInitVal(); in ActOnEnumBody()
18224 Diag(ECD->getLocation(), diag::warn_flag_enum_constant_out_of_range) in ActOnEnumBody()
18225 << ECD << Enum; in ActOnEnumBody()