Fix a -Wlogical-op-parentheses warning; NFC

This should address bot failures like:
https://lab.llvm.org/buildbot/#/builders/77/builds/18317
This commit is contained in:
Aaron Ballman 2022-06-06 07:51:24 -04:00
parent 0f5fc4c9a6
commit cc30d43ce4
1 changed files with 3 additions and 3 deletions

View File

@ -1758,9 +1758,9 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
TUK = Sema::TUK_Reference;
else if (Tok.is(tok::l_brace) ||
(DSC != DeclSpecContext::DSC_association &&
(getLangOpts().CPlusPlus && Tok.is(tok::colon)) ||
getLangOpts().CPlusPlus && Tok.is(tok::colon)) ||
(isClassCompatibleKeyword() &&
(NextToken().is(tok::l_brace) || NextToken().is(tok::colon))))) {
(NextToken().is(tok::l_brace) || NextToken().is(tok::colon)))) {
if (DS.isFriendSpecified()) {
// C++ [class.friend]p2:
// A class shall not be defined in a friend declaration.