erik.pilkington added inline comments.

================
Comment at: clang/lib/Sema/SemaDecl.cpp:10015
     // merged.
     if (MergeFunctionDecl(NewFD, OldDecl, S, MergeTypeWithPrevious)) {
       NewFD->setInvalidDecl();
----------------
The problem is here, MergeFunctionDecl() needs the injected template args, 
but...


================
Comment at: clang/lib/Sema/SemaDecl.cpp:10026
       auto *OldFD = OldTemplateDecl->getTemplatedDecl();
       NewFD->setPreviousDeclaration(OldFD);
       adjustDeclContextForDeclaratorDecl(NewFD, OldFD);
----------------
... we don't link the two declarations until here!


Repository:
  rC Clang

https://reviews.llvm.org/D53046



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to