=?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= <tigbrc...@protonmail.com>, =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= <tigbrc...@protonmail.com>, =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= <tigbrc...@protonmail.com>, =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= <tigbrc...@protonmail.com>, =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= <tigbrc...@protonmail.com>, =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= <tigbrc...@protonmail.com>, =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= <tigbrc...@protonmail.com> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/89...@github.com>
================ @@ -98,22 +124,21 @@ static bool greaterBySign(const llvm::APSInt &A, const llvm::APSInt &B) { } bool TaggedUnionMemberCountCheck::isCountingEnumLikeName( - StringRef Name) const noexcept { - if (llvm::any_of(ParsedCountingEnumPrefixes, - [&Name](const StringRef &Prefix) -> bool { - return Name.starts_with_insensitive(Prefix); - })) + StringRef Name) const { + if (llvm::any_of(CountingEnumPrefixes, [Name](StringRef Prefix) -> bool { + return Name.starts_with_insensitive(Prefix); + })) return true; - if (llvm::any_of(ParsedCountingEnumSuffixes, - [&Name](const StringRef &Suffix) -> bool { - return Name.ends_with_insensitive(Suffix); - })) + if (llvm::any_of(CountingEnumSuffixes, [Name](StringRef Suffix) -> bool { + return Name.ends_with_insensitive(Suffix); + })) return true; return false; } -size_t TaggedUnionMemberCountCheck::getNumberOfValidEnumValues( - const EnumDecl *Ed) noexcept { +std::size_t TaggedUnionMemberCountCheck::getNumberOfValidEnumValues( + const EnumDecl *ED, + const EnumConstantDecl *&OutCountingEnumConstantDecl) { ---------------- isuckatcs wrote: ```suggestion std::pair<std::size_t, const EnumConstantDecl *> TaggedUnionMemberCountCheck::getNumberOfValidEnumValues( const EnumDecl *ED) { ``` https://github.com/llvm/llvm-project/pull/89925 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits