diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -16723,7 +16723,7 @@ if ((isa(LHS) && RHS->getType()->isBooleanType()) || (isa(RHS) && LHS->getType()->isBooleanType())) return; - + // Don't print obvious expressions. if (!UsefulToPrintExpr(LHS) && !UsefulToPrintExpr(RHS)) return; @@ -16744,9 +16744,16 @@ DiagSide[I].Result.Val, Side->getType(), DiagSide[I].ValueString); } if (DiagSide[0].Print && DiagSide[1].Print) { + if (DiagSide[0].ValueString == SmallString<12>("false") && DiagSide[1].ValueString == SmallString<12>("false")) + { + return; + } + else + { Diag(Op->getExprLoc(), diag::note_expr_evaluates_to) << DiagSide[0].ValueString << Op->getOpcodeStr() << DiagSide[1].ValueString << Op->getSourceRange(); + } } } }