<div dir="ltr"><div>I can't find any thing about re declare function twice with different arguments in the standard. So I think it's a non defined behavior.</div><div>Currently, what clang does is always pick the latest attribute it sees.</div>
<div><br></div><div>my change is to fix the case that one function has multiple format_arg attribute<br></div><div><br></div><div>and your suggestion is essentially about check the behavior when people define a function with different attribute (it doesn't have to be format_arg, it could be any of the attributes)</div>
<div><br></div><div>Unless you could confirm current clang behavior is desired (always use the latest declaration), I don't think it's good to write a test case for non-defined behavior. Even we really want to do it, I want to do it in a separate patch because people then could revert it separately.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 23, 2013 at 9:30 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 17 September 2013 17:04, Fuyao Zhao <<a href="mailto:fuyaoz@google.com">fuyaoz@google.com</a>> wrote:<br>
> hi, it's just re-definition of the functions. I could look at where to add<br>
> the test case for this but it should not be in my this change.<br>
<br>
</div>It is not obvious which of attributes is used (or if they are<br>
combined), so I think the test should be included in the patch.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Fuyao
</div>