[Patch]"Sema::checkFormatStringExpr" should check multiple "FormatAttr".
fuyaoz at google.com
Tue Sep 24 13:48:46 PDT 2013
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.
Currently, what clang does is always pick the latest attribute it sees.
my change is to fix the case that one function has multiple format_arg
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)
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.
On Mon, Sep 23, 2013 at 9:30 AM, Rafael Espíndola <
rafael.espindola at gmail.com> wrote:
> On 17 September 2013 17:04, Fuyao Zhao <fuyaoz at google.com> wrote:
> > hi, it's just re-definition of the functions. I could look at where to
> > the test case for this but it should not be in my this change.
> It is not obvious which of attributes is used (or if they are
> combined), so I think the test should be included in the patch.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits