File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -451,15 +451,11 @@ class Expr : public ValueStmt {
451451 return (OK == OK_Ordinary || OK == OK_BitField);
452452 }
453453
454- bool isInsideCondition () const {
455- return IsInsideCondition;
456- }
454+ bool isInsideCondition () const { return IsInsideCondition; }
457455
458456 // / setValueKind - Mark this expression to be inside a condition.
459457 // / necessary for `warn_assignment_bool_context` diagnostic
460- void setIsInsideCondition () {
461- IsInsideCondition = true ;
462- }
458+ void setIsInsideCondition () { IsInsideCondition = true ; }
463459
464460 // / setValueKind - Set the value kind produced by this expression.
465461 void setValueKind (ExprValueKind Cat) { ExprBits.ValueKind = Cat; }
Original file line number Diff line number Diff line change @@ -703,7 +703,8 @@ void Sema::DiagnoseAssignmentBoolContext(Expr *E, QualType Ty) {
703703 E = ICE->getSubExpr ();
704704 }
705705
706- // Condition-assignment warnings are already handled by `DiagnoseAssignmentAsCondition()`
706+ // Condition-assignment warnings are already handled by
707+ // `DiagnoseAssignmentAsCondition()`
707708 if (E->isInsideCondition ())
708709 return ;
709710
@@ -714,8 +715,7 @@ void Sema::DiagnoseAssignmentBoolContext(Expr *E, QualType Ty) {
714715 // only does for regular assignment.
715716 if (Op->getOpcode () == BO_Assign) {
716717 SourceLocation Loc = Op->getOperatorLoc ();
717- Diag (Loc, diag::warn_assignment_bool_context)
718- << E->getSourceRange ();
718+ Diag (Loc, diag::warn_assignment_bool_context) << E->getSourceRange ();
719719
720720 SourceLocation Open = E->getBeginLoc ();
721721 SourceLocation Close =
You can’t perform that action at this time.
0 commit comments