MaskRay marked 3 inline comments as done.
MaskRay added inline comments.

================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5647-5650
 def warn_overloaded_shift_in_comparison :Warning<
   "overloaded operator %select{>>|<<}0 has higher precedence than "
   "comparison operator">,
+  InGroup<OverloadedShiftOpParentheses>, DefaultIgnore;
----------------
rsmith wrote:
> I think this should remain enabled by default unless you have evidence of 
> false positives. In my experience, this catches bugs like
> 
> ```
> ostream << "got expected result: " << x == 0;
> ```
> 
> ... and very little else.
> 
> That said, perhaps we could do better here, since this warning is typically 
> followed by an error: if we detect the special case of overload resolution 
> failure for an operator with an `<<` (or `>>`) operator expression on its 
> left-hand side, we could produce a much more targeted diagnostic for this 
> case and avoid the current situation of a warning followed by an error for 
> the same problem. If we did that, we could probably remove this warning 
> entirely.
Restored this one.

Searching for Wno-parentheses can probably give more interesting results...


Repository:
  rC Clang

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

https://reviews.llvm.org/D65192



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

Reply via email to