<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 12/4/18 7:07 PM, Richard Smith
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOfiQq=KGFGTE4dX6=cbXyirfzJCLyYNj1NdrOEaTYs9nJpYSw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div class="gmail_quote">
          <div dir="ltr">On Tue, 4 Dec 2018 at 16:46, Erik Pilkington
            via cfe-commits <<a
              href="mailto:cfe-commits@lists.llvm.org"
              moz-do-not-send="true">cfe-commits@lists.llvm.org</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Author:
            epilk<br>
            Date: Tue Dec  4 16:43:11 2018<br>
            New Revision: 348325<br>
            <br>
            URL: <a
              href="http://llvm.org/viewvc/llvm-project?rev=348325&view=rev"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://llvm.org/viewvc/llvm-project?rev=348325&view=rev</a><br>
            Log:<br>
            [Sema] Remove some conditions of a failing assert<br>
            <br>
            We should have been checking that this state is consistent,
            but its<br>
            possible for it to be filled later, so it isn't really sound
            to check<br>
            it here anyways.<br>
            <br>
            Fixes <a href="http://llvm.org/PR39742" rel="noreferrer"
              target="_blank" moz-do-not-send="true">llvm.org/PR39742</a><br>
            <br>
            Modified:<br>
                cfe/trunk/lib/AST/DeclTemplate.cpp<br>
                cfe/trunk/test/SemaCXX/friend-template-redecl.cpp<br>
            <br>
            Modified: cfe/trunk/lib/AST/DeclTemplate.cpp<br>
            URL: <a
href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclTemplate.cpp?rev=348325&r1=348324&r2=348325&view=diff"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclTemplate.cpp?rev=348325&r1=348324&r2=348325&view=diff</a><br>
==============================================================================<br>
            --- cfe/trunk/lib/AST/DeclTemplate.cpp (original)<br>
            +++ cfe/trunk/lib/AST/DeclTemplate.cpp Tue Dec  4 16:43:11
            2018<br>
            @@ -329,8 +329,6 @@ void FunctionTemplateDecl::mergePrevDecl<br>
            <br>
               // Ensure we don't leak any important state.<br>
               assert(ThisCommon->Specializations.size() == 0
            &&<br>
            -       
             !ThisCommon->InstantiatedFromMember.getPointer()
            &&<br>
            -         !ThisCommon->InstantiatedFromMember.getInt()
            &&<br>
                      "Can't merge incompatible declarations!");<br>
            <br>
               Base::Common = PrevCommon;<br>
            <br>
            Modified: cfe/trunk/test/SemaCXX/friend-template-redecl.cpp<br>
            URL: <a
href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/friend-template-redecl.cpp?rev=348325&r1=348324&r2=348325&view=diff"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/friend-template-redecl.cpp?rev=348325&r1=348324&r2=348325&view=diff</a><br>
==============================================================================<br>
            --- cfe/trunk/test/SemaCXX/friend-template-redecl.cpp
            (original)<br>
            +++ cfe/trunk/test/SemaCXX/friend-template-redecl.cpp Tue
            Dec  4 16:43:11 2018<br>
            @@ -18,3 +18,14 @@ void f() {<br>
               foo(x);<br>
               bar(x);<br>
             }<br>
            +<br>
            +namespace PR39742 {<br>
            +template<typename><br>
            +struct wrapper {<br>
            +  template<typename><br>
            +  friend void friend_function_template() {}<br>
            +};<br>
            +<br>
            +wrapper<bool> x;<br>
            +wrapper<int> y;<br>
          </blockquote>
          <div><br>
          </div>
          <div>This is ill-formed due to the redefinition of the
            template; we should at least have a FIXME to properly reject
            it.</div>
        </div>
      </div>
    </blockquote>
    <br>
    Ah, good point. Added a FIXME in r348388. The fix for this is
    <a class="moz-txt-link-freetext" href="https://reviews.llvm.org/D21508">https://reviews.llvm.org/D21508</a>.<br>
    <br>
    Thanks!<br>
    <br>
    <blockquote type="cite"
cite="mid:CAOfiQq=KGFGTE4dX6=cbXyirfzJCLyYNj1NdrOEaTYs9nJpYSw@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            +}<br>
            <br>
            <br>
            _______________________________________________<br>
            cfe-commits mailing list<br>
            <a href="mailto:cfe-commits@lists.llvm.org" target="_blank"
              moz-do-not-send="true">cfe-commits@lists.llvm.org</a><br>
            <a
              href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>