File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -5169,7 +5169,7 @@ enum class SpellingKind : size_t {
5169
5169
static const size_t NumSpellingKinds = (size_t )SpellingKind::NumSpellingKinds;
5170
5170
5171
5171
class SpellingList {
5172
- std::vector<std::string> Spellings[ NumSpellingKinds] ;
5172
+ std::array<std:: vector<std::string>, NumSpellingKinds> Spellings ;
5173
5173
5174
5174
public:
5175
5175
ArrayRef<std::string> operator [](SpellingKind K) const {
@@ -5217,11 +5217,7 @@ class SpellingList {
5217
5217
}
5218
5218
5219
5219
bool hasSpelling () const {
5220
- for (size_t Kind = 0 ; Kind < NumSpellingKinds; ++Kind) {
5221
- if (Spellings[Kind].size () > 0 )
5222
- return true ;
5223
- }
5224
- return false ;
5220
+ return llvm::any_of (Spellings, [](const auto &L) { return !L.empty (); });
5225
5221
}
5226
5222
};
5227
5223
You can’t perform that action at this time.
0 commit comments