File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -204,13 +204,11 @@ void BoolBitwiseOperationCheck::check(const MatchFinder::MatchResult &Result) {
204204 RHSOpcode = RHS->getOpcode ();
205205
206206 const BinaryOperator *SurroundedExpr = nullptr ;
207- if ((MatchedExpr->getOpcode () == BO_Or && ParentOpcode.has_value () &&
208- *ParentOpcode == BO_LAnd) ||
209- (MatchedExpr->getOpcode () == BO_And && ParentOpcode.has_value () &&
210- llvm::is_contained ({BO_Xor, BO_Or}, *ParentOpcode)))
207+ if ((MatchedExpr->getOpcode () == BO_Or && ParentOpcode == BO_LAnd) ||
208+ (MatchedExpr->getOpcode () == BO_And &&
209+ llvm::is_contained ({BO_Xor, BO_Or}, ParentOpcode)))
211210 SurroundedExpr = MatchedExpr;
212- else if (MatchedExpr->getOpcode () == BO_AndAssign && RHSOpcode.has_value () &&
213- *RHSOpcode == BO_LOr)
211+ else if (MatchedExpr->getOpcode () == BO_AndAssign && RHSOpcode == BO_LOr)
214212 SurroundedExpr = RHS;
215213
216214 if (hasExplicitParentheses (SurroundedExpr, *Result.SourceManager ,
You can’t perform that action at this time.
0 commit comments