[cfe-commits] Patch for PR 10275 and radar 10696348: format attribute ignore on obj-c methods and other cases

Jean-Daniel Dupas devlists at shadowlab.org
Sat Jan 14 14:59:20 PST 2012


Hello,

Here is a patch to fix 2 issues:
- format strings attributes are not checked on obj-c methods.
- format attribute using NSString and CFString format are not checked at all.

This patch add a CheckObjCMethodCall() member to Sema that mirrors CheckFunctionCall() but work for obj-c method call and not function call.

To match the CheckFunctionCall() function, this new function handle "format" attributes (which was not handled yet), and "non null" attributes (which was previously handled in SemaObjC).

The second issue is that CheckablePrintfAttr() return true only if the format is printf, but should also returns true for NSString and CFString formats.

Please, can somebody review it, and apply it if it is fine.
Thanks.

-- Jean-Daniel



-------------- next part --------------
A non-text attachment was scrubbed...
Name: objc-format.patch
Type: application/octet-stream
Size: 19144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120114/d7fb760e/attachment.obj>


More information about the cfe-commits mailing list