================ @@ -11683,7 +11683,10 @@ static void DiagnoseIntInBoolContext(Sema &S, Expr *E) { S.Diag(ExprLoc, diag::warn_left_shift_always) << (Result.Val.getInt() != 0); else if (E->getType()->isSignedIntegerType()) - S.Diag(ExprLoc, diag::warn_left_shift_in_bool_context) << E; + S.Diag(ExprLoc, diag::warn_left_shift_in_bool_context) + << FixItHint::CreateInsertion(E->getBeginLoc(), "(") + << FixItHint::CreateInsertion(S.getLocForEndOfToken(E->getEndLoc()), + ") != 0"); ---------------- mizvekov wrote:
Explained in the commit message, but this would look incorrect with quotes as it was pasting code together. https://github.com/llvm/llvm-project/pull/134769 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits