[cfe-commits] [PATCH] Handle format_arg attribute on CXX instance members
Douglas Gregor
dgregor at apple.com
Tue Feb 7 10:01:03 PST 2012
On Feb 6, 2012, at 2:05 PM, Jean-Daniel Dupas wrote:
> Ping.
It looks okay, except that this:
+ if (const NamedDecl *ND = dyn_cast<NamedDecl>(CE->getCalleeDecl())) {
+ if (const FormatArgAttr *FA = ND->getAttr<FormatArgAttr>()) {
assumes that CE->getCalleeDecl() can never return NULL. That's not generally the case, because the call could be a call to (say) a function pointer.
- Doug
> Le 2 févr. 2012 à 00:28, Jean-Daniel Dupas a écrit :
>
>> You're right, better with the patch attached.
>>
>> Le 2 févr. 2012 à 00:27, Eric Christopher a écrit :
>>
>>> Nothing attached.
>>>
>>> -eric
>>>
>>> On Feb 1, 2012, at 3:25 PM, Jean-Daniel Dupas wrote:
>>>
>>>> Hi,
>>>>
>>>> Fix handling of C++ instance method with format_arg attribute used as format string.
>>>> Also add tests to make sure we properly handle format_idx argument on C++ instance members (we have to take care of the implicit this argument).
>>>>
>>>> Is this patch OK ?
>>>> Thanks
>>>>
>>>>
>>>> -- Jean-Daniel
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> cfe-commits mailing list
>>>> cfe-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>
>>
>> -- Jean-Daniel
>>
>>
>>
>> <cxxformat.patch>_______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
> -- Jean-Daniel
>
>
>
> <1-cppformat.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list