From aaea76ba02301efd8aa0c8d5da4af400d03b2fb6 Mon Sep 17 00:00:00 2001 From: David Bolvansky Date: Mon, 7 Oct 2019 21:57:03 +0000 Subject: [Diagnostics] Emit better -Wbool-operation's warning message if we known that the result is always true llvm-svn: 373973 --- clang/lib/Sema/SemaExpr.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'clang/lib/Sema/SemaExpr.cpp') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 3cb999dacc4..f08b6168094 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -13479,10 +13479,6 @@ ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, // C99 does not support '~' for complex conjugation. Diag(OpLoc, diag::ext_integer_complement_complex) << resultType << Input.get()->getSourceRange(); - else if (Input.get()->isKnownToHaveBooleanValue()) - Diag(OpLoc, diag::warn_bitwise_negation_bool) - << Input.get()->getSourceRange() - << FixItHint::CreateReplacement(OpLoc, "!"); else if (resultType->hasIntegerRepresentation()) break; else if (resultType->isExtVectorType() && Context.getLangOpts().OpenCL) { -- cgit v1.2.3