[clang] [clang] Added warn-assignment-bool-context (PR #115234)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 21 07:19:44 PST 2025


================
@@ -761,6 +803,17 @@ ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty,
     }
   }
 
+  // FIXME: Doesn't include C89, so this warning isn't emitted when passing
+  // `std=c89`.
+  auto isC = getLangOpts().C99 || getLangOpts().C11 || getLangOpts().C17 ||
----------------
erichkeane wrote:

Usually for "C" we can just test "not C++".  That said, why does this diagnostic not make sense in C++?  

https://github.com/llvm/llvm-project/pull/115234


More information about the cfe-commits mailing list