<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - -Woverloaded-shift-op-parentheses warning text reverses precedence"
   href="http://llvm.org/bugs/show_bug.cgi?id=21372">21372</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-Woverloaded-shift-op-parentheses warning text reverses precedence
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mitza@ociweb.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Version is 3.5.0 but Bugzilla doesn't let me select it.

-Woverloaded-shift-op-parentheses tells me:

warning: overloaded operator >> has lower precedence than comparison operator

No, it has higher precedence.  See
<a href="http://en.cppreference.com/w/cpp/language/operator_precedence">http://en.cppreference.com/w/cpp/language/operator_precedence</a> and Matt's
comments from
<a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130506/079687.html">http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130506/079687.html</a>

This warning is biased to std::iostreams usage

stream << something == other

really does deserve a warning.  The particular code I'm looking at is not
std::istream and its operator>> returns a result code, not a stream&.

if (custom_stream >> variable == 0)

This doesn't need extra parens and doesn't deserve a warning.  In general, the
iostreams misuse can be constrained to operator<< since operator>> takes an
rvalue (or manipulator) so probably won't be a comparison expression.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>