We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f73f5af commit 280609cCopy full SHA for 280609c
clang/lib/Format/FormatToken.cpp
@@ -42,11 +42,12 @@ static SmallVector<StringRef> CppNonKeywordTypes = {
42
};
43
44
bool FormatToken::isTypeName(const LangOptions &LangOpts) const {
45
+ if (is(TT_TypeName) || Tok.isSimpleTypeSpecifier(LangOpts))
46
+ return true;
47
const bool IsCpp = LangOpts.CXXOperatorNames;
- return is(TT_TypeName) || Tok.isSimpleTypeSpecifier(LangOpts) ||
- (IsCpp && is(tok::identifier) &&
48
- std::binary_search(CppNonKeywordTypes.begin(),
49
- CppNonKeywordTypes.end(), TokenText));
+ return IsCpp && is(tok::identifier) &&
+ std::binary_search(CppNonKeywordTypes.begin(),
50
+ CppNonKeywordTypes.end(), TokenText);
51
}
52
53
bool FormatToken::isTypeOrIdentifier(const LangOptions &LangOpts) const {
0 commit comments