<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 --- - [modules] should probably not diagnose conflict between unimported default argument and new default argument"
   href="http://llvm.org/bugs/show_bug.cgi?id=19496">19496</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[modules] should probably not diagnose conflict between unimported default argument and new default argument
          </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>All
          </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>Modules
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>richard-llvm@metafoo.co.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Suppose we have:

m1.h: (empty)
m2.h: void f(int = 0);
module.map: module m { module m1 { header "m1.h" } module m2 { header "m2.h" }
}
tu.cc: import m1; void f(int = 0);

Right now, we'll reject this due to the redefinition of the default argument
for 'f'. We should (probably) allow this, because the default argument is not
visible in tu.cc (so it's not redundant).

Further, we should check that the default argument matches that from the
invisible declaration, as is required by [dcl.fct.default]p4 ("the accumulated
sets of default arguments at the end of the translation units shall be the
same").

Finally, we might want to warn whenever this happens ("default argument for 1st
parameter of function 'foo' is also provided by module 'blah'; consider
importing that module instead of redefining the default argument") since it
indicates layering confusion / non-modular code.</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>