<html>
    <head>
      <base href="https://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 --- - Can't match parenExpr() in a unaryOperator()"
   href="https://llvm.org/bugs/show_bug.cgi?id=26390">26390</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Can't match parenExpr() in a unaryOperator()
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>libclang
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>legalize@xmission.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>clanger> cat /tmp/a.cpp
int negation(int a, int b) {
  if (!(a < b))
    return 0;
  if (!(a <= b))
    return 1;
  if (!(a == b))
    return 2;
  if (!(a >= b))
    return 3;
  if (!(a > b))
    return 4;
  return 5;
}
~/dev/build
clanger> bin/clang-query /tmp/a.cpp -- -std=c++11
clang-query> match parenExpr()

Match #1:

/tmp/a.cpp:2:8: note: "root" binds here
  if (!(a < b))
       ^~~~~~~

Match #2:

/tmp/a.cpp:4:8: note: "root" binds here
  if (!(a <= b))
       ^~~~~~~~

Match #3:

/tmp/a.cpp:6:8: note: "root" binds here
  if (!(a == b))
       ^~~~~~~~

Match #4:

/tmp/a.cpp:8:8: note: "root" binds here
  if (!(a >= b))
       ^~~~~~~~

Match #5:

/tmp/a.cpp:10:8: note: "root" binds here
  if (!(a > b))
       ^~~~~~~
5 matches.
clang-query> match unaryOperator()

Match #1:

/tmp/a.cpp:2:7: note: "root" binds here
  if (!(a < b))
      ^~~~~~~~

Match #2:

/tmp/a.cpp:4:7: note: "root" binds here
  if (!(a <= b))
      ^~~~~~~~~

Match #3:

/tmp/a.cpp:6:7: note: "root" binds here
  if (!(a == b))
      ^~~~~~~~~

Match #4:

/tmp/a.cpp:8:7: note: "root" binds here
  if (!(a >= b))
      ^~~~~~~~~

Match #5:

/tmp/a.cpp:10:7: note: "root" binds here
  if (!(a > b))
      ^~~~~~~~
5 matches.
clang-query> match unaryOperator(parenExpr())
0 matches.
clang-query> match unaryOperator(has(parenExpr()))
0 matches.
clang-query> ^D</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>