[PATCH] D53046: [Sema] Fix an error-on-valid with friends and templates

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 9 20:32:37 PDT 2018


erik.pilkington added a comment.

In https://reviews.llvm.org/D53046#1259933, @rjmccall wrote:

> The linking does actually happen in this test case, right?  Can we just do something when linking them to unify their `Common` structures?


Yep, that would work too I think. We can't properly merge in the general case, because we could have to decide between more than one identical instantiations of different template redecls, but in this case the only ordering problem is with the injected template arguments, which I believe we can merge (by just discarding the new arguments, if a previous redeclaration already has some). It would definitely be less intrusive, but its a more complicated invariant. Do you think that is a better solution? I could go either way.


Repository:
  rC Clang

https://reviews.llvm.org/D53046





More information about the cfe-commits mailing list