[llvm-bugs] [Bug 36599] __attribute__((format_arg(X)) is broken with ObjC message sends

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 5 09:18:20 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36599

Ben Hamilton <bhamiltoncx at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|ASSIGNED                    |RESOLVED

--- Comment #1 from Ben Hamilton <bhamiltoncx at gmail.com> ---
This is actually an off-by-one error in the Apple SDK:

@interface NSBundle
- (NSString *)localizedStringForKey:(NSString *)key value:(nullable NSString
*)value table:(nullable NSString *)tableName __attribute__((format_arg(1)));
@end

should be:

@interface NSBundle
- (NSString *)localizedStringForKey:(NSString *)key value:(nullable NSString
*)value table:(nullable NSString *)tableName __attribute__((format_arg(2)));
@end

since it's the 2nd argument (value) which potentially takes a format string,
and format_arg(X) is 1-based, not 0-based.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180305/a30a8e37/attachment.html>


More information about the llvm-bugs mailing list