<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 --- - Missing result unused after macro expansion"
   href="https://llvm.org/bugs/show_bug.cgi?id=24404">24404</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Missing result unused after macro expansion
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>adkap@adkap.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This follows from a bug in a popular Obj-C testing framework Expecta:
<a href="https://github.com/specta/expecta/issues/160">https://github.com/specta/expecta/issues/160</a>

Basically, a macro evaluates to an Objective-C object pointer, is sent a
message, and the result is unused. There is no warning produced. However if the
macro is enclosed in parens/(), the warning is produced as expected.

This isn't an academic case: I had several tests "pass" because the trailing
parentheses were accidentally omitted.

A very short example

<a href="https://gist.github.com/adamkaplan/3c69fda47bf02790a860#file-expexpectawarningdemo-m">https://gist.github.com/adamkaplan/3c69fda47bf02790a860#file-expexpectawarningdemo-m</a>

My configuration:
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.4.0</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>