<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - clang_Type_visitFields documentation is misleading"
   href="https://bugs.llvm.org/show_bug.cgi?id=41067">41067</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang_Type_visitFields documentation is misleading
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </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>Thierry.Martinez@inria.fr
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>klimek@google.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>clang_Type_visitFields result is documented as follows.

| \returns a non-zero value if the traversal was terminated
| prematurely by the visitor returning \c CXFieldVisit_Break.

This documentation is misleading because clang_Type_visitFields returns a
non-zero value (true) regardless whether the traversal was terminated
prematurely or not.

The function returns zero (false) solely if its argument is not the type of a
record declaration.

It is worth noticing that the documentation suggests that the return value is
consistent with the return value of clang_visitChildren (which returns a
non-zero value only in case of interruption), while it is not in practice.

I think that it is fine to keep the inconsistency between the two functions
(for backward compatibility) as long as the return value is correctly
documented.</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>