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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 21 08:45:19 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:

Why doesn't this make sense in ObjC?  it seems like it should.  And we dont' want to suppress this in CUDA or OMP mode either, that is still valid C/C++ with extensions.

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


More information about the cfe-commits mailing list