[PATCH] D83647: Don't allow mangling substitutions to refer to unrelated entities from different s.

2020-07-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Hm, I think this is not quite right. For example, given: template struct X {}; template auto f(T a, decltype(a)) { struct A {}; struct B {}; return X(); } decltype(f(0, 0)) g() {} ... I think we won't use a substitution from the first parameter of `f`

[PATCH] D83647: Don't allow mangling substitutions to refer to unrelated entities from different s.

2020-07-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: rjmccall. Herald added a project: clang. Herald added a subscriber: cfe-commits. Per the ABI rules, substitutable components are symbolic constructs, not the associated mangling character strings, so references to function parameters or templa