aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/FormatToken.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/FormatToken.cpp')
-rw-r--r--clang/lib/Format/FormatToken.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/FormatToken.cpp b/clang/lib/Format/FormatToken.cpp
index 0d8ae1c..9c98b781 100644
--- a/clang/lib/Format/FormatToken.cpp
+++ b/clang/lib/Format/FormatToken.cpp
@@ -43,6 +43,7 @@ static SmallVector<StringRef> CppNonKeywordTypes = {
bool FormatToken::isTypeName(const LangOptions &LangOpts) const {
if (is(TT_TypeName) || Tok.isSimpleTypeSpecifier(LangOpts))
return true;
+ assert(llvm::is_sorted(CppNonKeywordTypes));
return (LangOpts.CXXOperatorNames || LangOpts.C11) && is(tok::identifier) &&
llvm::binary_search(CppNonKeywordTypes, TokenText);
}