<div dir="ltr">On Sun, Apr 28, 2013 at 2:58 PM, Guillaume Papin <span dir="ltr"><<a href="mailto:guillaume.papin@epitech.eu" target="_blank">guillaume.papin@epitech.eu</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">I implemented it in cpp11-migrate at first but then thought it would be<br>
a better fit next to hasInlineBody(), so it would mimic<br>
FunctionDecl::hasBody()/getBody(). It feels strange to me to have<br>
hasInlineBody() without its getter counterpart. But no problem for me to<br>
put it back in cpp11-migrate.<br>
<br>
I tried to find a case where it's risky to insert the override but I<br>
couldn't find one (e.g: a specialization dropping 'virtual' is not<br>
matched). Do you have one in mind?</blockquote><div><br></div><div style>Something like this:</div><div><br></div><div style>template<typename T> struct Derived : T {</div><div style>  void f(); // adding 'override' here will break instantiation of Derived<Base2></div>
<div style>};</div><div style>struct Base1 {</div><div style>  virtual void f();</div><div style>};</div><div style>struct Base2 {};</div><div style><br></div><div style>Derived<Base1> d1;</div><div style>Derived<Base2> d2;</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> writes:<br>
<br>
> I'm not convinced this is the right approach: getInlineBody has weird<br>
> semantics and thus it doesn't seem like a good fit as a general<br>
> purpose AST interface. It would make a lot more sense to me to have<br>
> the fallback to the template in the cpp11-migrate code, where it can<br>
> also handle other consequences of this, such as classifying such a fix<br>
> as "risky" (because it might not be correct for every instantiation).<br>
><br>
> On Sun, Apr 28, 2013 at 7:21 AM, Guillaume Papin<br>
> <<a href="mailto:guillaume.papin@epitech.eu">guillaume.papin@epitech.eu</a>> wrote:<br>
><br>
>     Uh, embarrassing, of course I failed the attachments:<br>
><br>
><br>
><br>
>     --<br>
>     Guillaume Papin<br>
><br>
>     _______________________________________________<br>
>     cfe-commits mailing list<br>
>     <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
>     <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
><br>
><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Guillaume Papin<br>
<br>
</font></span></blockquote></div><br></div></div>