<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 --- - __has_feature(cxx_reference_qualified_functions) should be checked when defining LLVM_HAS_RVALUE_REFERENCE_THIS"
   href="http://llvm.org/bugs/show_bug.cgi?id=21502">21502</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>__has_feature(cxx_reference_qualified_functions) should be checked when defining LLVM_HAS_RVALUE_REFERENCE_THIS
          </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>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>igor.bronstein@gmail.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>LLVM_HAS_RVALUE_REFERENCE_THIS macro is defined int Compiler.h:
<a href="http://llvm.org/docs/doxygen/html/Compiler_8h.html#a563b0d795936bbc69d7a40c6791c5827">http://llvm.org/docs/doxygen/html/Compiler_8h.html#a563b0d795936bbc69d7a40c6791c5827</a>

in the way as follows:
00080 #if __has_feature(cxx_rvalue_references) || LLVM_GNUC_PREREQ(4, 8, 1)
00081 #define LLVM_HAS_RVALUE_REFERENCE_THIS 1
00082 #else
00083 #define LLVM_HAS_RVALUE_REFERENCE_THIS 0
00084 #endif

Shouldn't its definition look like:

00080 #if __has_feature(cxx_reference_qualified_functions) ||
LLVM_GNUC_PREREQ(4, 8, 1)
00081 #define LLVM_HAS_RVALUE_REFERENCE_THIS 1
00082 #else
00083 #define LLVM_HAS_RVALUE_REFERENCE_THIS 0
00084 #endif

instead? __has_feature(cxx_reference_qualified_functions) checks whether Clang
support "Extending move semantics to *this" C+11 feature:
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm</a>

and that's exactly what the LLVM_HAS_RVALUE_REFERENCE_THIS is intended for.</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>