<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Mar 26, 2013, at 3:28 PM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:</div><blockquote type="cite"><div dir="ltr">On Tue, Mar 26, 2013 at 3:02 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="im"><div>On Mar 26, 2013, at 2:46 PM, Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:</div>
</div><div class="im"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+ RequireCompleteType(Loc, Class, 0);<br>
<br>
This would be an excellent opportunity to implicitly add your<br>
UnspecifiedInheritanceAttr to all the existing declarations. :)<br></blockquote><div><br></div><div>Is it OK if I just implicitly add the right attribute if there isn't one present already? I suppose the unspecified model is the only one that I need to add for correctness.</div>
</div></div></div></blockquote><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><br></div><div>It's actually important to lock this in at some point so we don't have different sizes at different TU points. In MSVC, if you declare a member pointer variable before the class definition, it uses the unspecified model. If you wait until after the definition, it will pick a more restrictive model.</div>
</div></div></div></blockquote><div><br></div></div>Yeah, I saw your comment to this effect earlier. I think adding UnspecifiedInheritanceAttr when you make a member pointer for a forward-declared class that lacks an explicit inheritance attribute makes sense. I wouldn't go down the road of adding, say, SingleInheritanceAttr to every class with single inheritance.</div>
<div><br></div><div>For sanity's sake, please add the attribute to all the existing declarations, though.</div></div></blockquote><div><br></div><div style="">I'm not 100% clear on what you mean. I added a SingleInheritanceAttr to every class that uses member pointers, but you're right this is kind of spammy and uses extra memory when we can easily check the class hierarchy later.</div>
<div style=""><br></div><div style="">Should I remove those attrs, and only ever add the Unspecified attr?</div></div></div></div>
</blockquote></div><br><div>Yes, I would change this to only ever add artificial Unspecified attributes.</div><div><br></div><div>John.</div></body></html>