File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -3158,6 +3158,7 @@ class ObjCHeaderStyleGuesser : public TokenAnalyzer {
3158
3158
" UIImage" ,
3159
3159
" UIView" ,
3160
3160
};
3161
+ assert (llvm::is_sorted (FoundationIdentifiers));
3161
3162
3162
3163
for (auto *Line : AnnotatedLines) {
3163
3164
if (Line->First && (Line->First ->TokenText .starts_with (" #" ) ||
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ static SmallVector<StringRef> CppNonKeywordTypes = {
43
43
bool FormatToken::isTypeName (const LangOptions &LangOpts) const {
44
44
if (is (TT_TypeName) || Tok.isSimpleTypeSpecifier (LangOpts))
45
45
return true ;
46
+ assert (llvm::is_sorted (CppNonKeywordTypes));
46
47
return (LangOpts.CXXOperatorNames || LangOpts.C11 ) && is (tok::identifier) &&
47
48
llvm::binary_search (CppNonKeywordTypes, TokenText);
48
49
}
You can’t perform that action at this time.
0 commit comments