<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 - Improve -Wdocumentation fix-it suggestion for multiple errors"
   href="https://bugs.llvm.org/show_bug.cgi?id=43808">43808</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Improve -Wdocumentation fix-it suggestion for multiple errors
          </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>enhancement
          </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>llvm@alex.lanin.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Given two different mismatches of documentation and code:

    /**
      *  @param[in] arg[]       Docu_1
      *  @param[in] cnt         Docu_2
      */
    void run(const char* const arg[], int argc);


When compiling with -Weverything:

    test.cpp:2:17: warning: parameter 'arg[]' not found in the function
declaration [-Wdocumentation]
      *  @param[in] arg[]       Docu_1
                    ^~~~~
    test.cpp:2:17: note: did you mean 'argc'?
      *  @param[in] arg[]       Docu_1
                    ^~~~~
                    argc
    test.cpp:3:17: warning: parameter 'cnt' not found in the function
declaration [-Wdocumentation]
      *  @param[in] cnt         Docu_2
                ^~~


So the clang-tidy fix-it doesn't really improve the situation:

    /**
      *  @param[in] argc        Docu_1
      *  @param[in] cnt         Docu_2
      */
    void run(const char* const arg[], int argc);


Expected behavior:

   1) arg[] should be replaced by "arg" and not "argc" as it's more similar.
   2) Consequently cnt would be replaced by argc as that would be the only
possibility after (1). I guess this will work out of the box after (1).</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>