[PATCH] D18296: [Sema] Handle UTF-8 invalid format string specifiers
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 19 12:34:09 PDT 2016
bruno created this revision.
bruno added a reviewer: rsmith.
bruno added subscribers: cfe-commits, dexonsmith.
Improve invalid format string specifier handling by printing out invalid specifiers characters with \x, \u and \U. Previously clang would print gargabe whenever the character is unprintable.
Example, before:
NSLog(@"%\u25B9", 3); => warning: invalid conversion specifier ' [-Wformat-invalid-specifier]
after:
NSLog(@"%\u25B9", 3); => warning: invalid conversion specifier '\u25b9' [-Wformat-invalid-specifier]
http://reviews.llvm.org/D18296
Files:
lib/Analysis/PrintfFormatString.cpp
lib/Sema/SemaChecking.cpp
test/SemaObjC/format-strings-objc.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18296.51116.patch
Type: text/x-patch
Size: 4365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160319/91f37c9d/attachment.bin>
More information about the cfe-commits
mailing list