[PATCH] D147844: Emit warning when implicit cast to bool happens in an conditional operator expression when used inside an overloaded shift operator expression

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 18 11:53:26 PDT 2023


aaron.ballman added inline comments.


================
Comment at: clang/test/Sema/parentheses.cpp:34
 public:
-  operator int();
+  operator bool();
   Stream &operator<<(int);
----------------
aaron.ballman wrote:
> Is this change necessary? Alternatively, can we add this as an overload instead of changing the operator?
I'm still wondering about this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147844



More information about the cfe-commits mailing list