[clang] cc30d43 - Fix a -Wlogical-op-parentheses warning; NFC
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 6 04:52:20 PDT 2022
Author: Aaron Ballman
Date: 2022-06-06T07:52:12-04:00
New Revision: cc30d43ce49c253e0274ca2679d42c2f706bfc3b
URL: https://github.com/llvm/llvm-project/commit/cc30d43ce49c253e0274ca2679d42c2f706bfc3b
DIFF: https://github.com/llvm/llvm-project/commit/cc30d43ce49c253e0274ca2679d42c2f706bfc3b.diff
LOG: Fix a -Wlogical-op-parentheses warning; NFC
This should address bot failures like:
https://lab.llvm.org/buildbot/#/builders/77/builds/18317
Added:
Modified:
clang/lib/Parse/ParseDeclCXX.cpp
Removed:
################################################################################
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp
index b5874e28786a..1afe1995237a 100644
--- a/clang/lib/Parse/ParseDeclCXX.cpp
+++ b/clang/lib/Parse/ParseDeclCXX.cpp
@@ -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)) ||
- (isClassCompatibleKeyword() &&
- (NextToken().is(tok::l_brace) || NextToken().is(tok::colon))))) {
+ getLangOpts().CPlusPlus && Tok.is(tok::colon)) ||
+ (isClassCompatibleKeyword() &&
+ (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.
More information about the cfe-commits
mailing list