[PATCH] Refactor attribute arguments
eli.friedman at gmail.com
Mon Jul 29 16:50:47 PDT 2013
LGTM. Sorry about the delay.
On Mon, Jul 29, 2013 at 6:19 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
> On Tue, Jul 23, 2013 at 10:06 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
>> LGTY then?
>> On Mon, Jul 22, 2013 at 5:44 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
>>> On Mon, Jul 22, 2013 at 2:37 PM, Aaron Ballman <aaron at aaronballman.com> wrote:
>>>> My testing showed it to be the case -- when using the index returned
>>>> from checkFunctionOrMethodArgumentIndex, it was always off by one or
>>>> two depending on context. Specifically:
>>>> const char* g2(const char*) __attribute__((format_arg(2)));
>>>> checkFunctionOrMethodIndex would return index 0 because it cares about
>>>> the const char * -- adding 1 to it when passing in the argument to
>>>> addAttr (to make it one based instead of zero based) was not
>>>> sufficient; I would get crashes in other parts of the system for that
>>>> test case. Having it pass in two is consistent with the previous
>>> Oh, right... checkFunctionOrMethodArgumentIndex is performing the
>>> conversion, but Sema for format attributes expects the unconverted
>>> version. We should probably clean that up at some point, but that
>>> shouldn't block this patch.
More information about the cfe-commits