xbolva00 marked an inline comment as done.
xbolva00 added inline comments.

================
Comment at: test/SemaCXX/warn-int-in-bool-context.cpp:99
+
+  if (ans == yes || no) // expected-warning {{enum constant in boolean 
context}}
+    return a;
----------------
aaron.ballman wrote:
> Why do we want to diagnose this case in C++ but not in C?
I think we can and should but for unknown reason (for me) this is GCC’s 
behaviour.

Maybe it is too noisy for C codebases? 

Maybe introduce -Wenum-in-bool-context as subgroup of -Wint-in-bool-context? 
And enable it for C and C++?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63082/new/

https://reviews.llvm.org/D63082



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to