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 {
31583158 " UIImage" ,
31593159 " UIView" ,
31603160 };
3161+ assert (llvm::is_sorted (FoundationIdentifiers));
31613162
31623163 for (auto *Line : AnnotatedLines) {
31633164 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 = {
4343bool FormatToken::isTypeName (const LangOptions &LangOpts) const {
4444 if (is (TT_TypeName) || Tok.isSimpleTypeSpecifier (LangOpts))
4545 return true ;
46+ assert (llvm::is_sorted (CppNonKeywordTypes));
4647 return (LangOpts.CXXOperatorNames || LangOpts.C11 ) && is (tok::identifier) &&
4748 llvm::binary_search (CppNonKeywordTypes, TokenText);
4849}
You can’t perform that action at this time.
0 commit comments