<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 12 May 2018 at 04:03, Andrew Rogers <span dir="ltr"><<a href="mailto:Andrew.Rogers@wdc.com" target="_blank">Andrew.Rogers@wdc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_-5612701105382892085WordSection1">
<p class="MsoNormal">Hi Argyrios, Richard,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I raised <a href="https://llvm.org/PR37399" target="_blank">PR37399</a> and have been discussing how to fix it with Reid.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The root of the problem is an interaction between the MSCXXABI code and the fact that an injected-class-name is inserted into the decl list for class template specializations after the MSCXXABI code has added an attribute to the decl for
 the class template specialization (in a case involving a dependent base of the class template where the MSCXXABI code is invoked before the injected-class-name is instantiated).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The two options for fixing this problem either involve working around the fact that the injected-class-name is inserted into the decl list for the class template specialization by copying the MSCXXABI attribute to the injected-class-name
 decl when it’s added to the list (this works but feels ugly), or not inserting the injected-class-name into the decl list for the class template specialization (this causes a number of other tests to fail, possibly because ClassTemplateSpecializationDec<wbr>l::getMostRecentDecl()
 explicitly works around the fact that there will be injected-class-names in the decl list for class template specializations, though as yet unconfirmed).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have noticed that you have both put comments on ClassTemplateSpecializationDec<wbr>l::getMostRecentDecl() which seem to suggest the fact that the injected-class-name is inserted into the decl list for the class template specialization seems
 to be an error in and of itself. Does it make more sense to try and clean up the fact that injected-class-names are inserted into the decl list, resulting in a broader change, or just try and point-fix the MSCXXABI issue?</p></div></div></blockquote><div><br></div><div>I think it makes sense to try to clean this up more generally, if you're interested in giving that a go. Here's the design that I would try: add a new TypeDecl subclass for the injected-class-name (maybe InjectedClassNameDecl), and represent the injected-class-name of all classes as an InjectedClassNameDecl rather than a CXXRecordDecl.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div class="m_-5612701105382892085WordSection1">
<p class="MsoNormal">I’m a clang newbie, so would appreciate any feedback you could give – TIA! Further details are in
<a href="https://llvm.org/PR37399" target="_blank">PR37399</a>.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="color:black">Yours, Andrew R<u></u><u></u></span></p>
</div>
</div>

</blockquote></div><br></div></div>