[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:43 PST 2025


================
@@ -8477,6 +8477,9 @@ def err_incomplete_object_call : Error<
 def warn_condition_is_assignment : Warning<"using the result of an "
   "assignment as a condition without parentheses">,
   InGroup<Parentheses>;
+def warn_assignment_bool_context : Warning<"suggest parentheses around assignment used as truth value">,
----------------
erichkeane wrote:

This diagnostic wording doesn't really make sense, it needs to tell the person what is wrong.  

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


More information about the cfe-commits mailing list