Re: [PATCH] D18296: [Sema] Handle UTF-8 invalid format string specifiers

2016-03-29 Thread Bruno Cardoso Lopes via cfe-commits
bruno closed this revision. bruno added a comment. Thanks Richard. Applied your last comments and committed in r264752 http://reviews.llvm.org/D18296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D18296: [Sema] Handle UTF-8 invalid format string specifiers

2016-03-28 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: lib/Analysis/FormatString.cpp:276 @@ +275,3 @@ + // UTF-8 sequence. If that's the case, adjust the length accordingly. + if (llvm::sys::locale::isPrint(FirstByte)) +return false;

Re: [PATCH] D18296: [Sema] Handle UTF-8 invalid format string specifiers

2016-03-28 Thread Bruno Cardoso Lopes via cfe-commits
bruno updated this revision to Diff 51859. bruno added a comment. Update after Richard's review. - Handle scanf - Properly update `ConversionSpecifier` http://reviews.llvm.org/D18296 Files: include/clang/Analysis/Analyses/FormatString.h lib/Analysis/FormatString.cpp

Re: [PATCH] D18296: [Sema] Handle UTF-8 invalid format string specifiers

2016-03-28 Thread Bruno Cardoso Lopes via cfe-commits
bruno added a comment. In http://reviews.llvm.org/D18296#384766, @rsmith wrote: > This patch builds a length-1 `ConversionSpecifier` but includes the complete > code point in the length of the overall format specifier, which is > inconsistent. Please either treat the trailing bytes as part of

Re: [PATCH] D18296: [Sema] Handle UTF-8 invalid format string specifiers

2016-03-28 Thread Richard Smith via cfe-commits
rsmith added a comment. This patch builds a length-1 `ConversionSpecifier` but includes the complete code point in the length of the overall format specifier, which is inconsistent. Please either treat the trailing bytes as part of the `ConversionSpecifier` or revert the changes to

Re: [PATCH] D18296: [Sema] Handle UTF-8 invalid format string specifiers

2016-03-24 Thread Bruno Cardoso Lopes via cfe-commits
bruno added a comment. Ping! http://reviews.llvm.org/D18296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D18296: [Sema] Handle UTF-8 invalid format string specifiers

2016-03-19 Thread Bruno Cardoso Lopes via cfe-commits
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