Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
dc195d00 |
| 29-Mar-2016 |
Bruno Cardoso Lopes <bruno.cardoso@gmail.com> |
[Sema] Attempt to fix tests for utf-8 invalid format string specifiers
Followup from r264752.
Attempt to appease buildbots: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/2882 http:
[Sema] Attempt to fix tests for utf-8 invalid format string specifiers
Followup from r264752.
Attempt to appease buildbots: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/2882 http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/2619
llvm-svn: 264765
show more ...
|
#
0c18d03d |
| 29-Mar-2016 |
Bruno Cardoso Lopes <bruno.cardoso@gmail.com> |
[Sema] Handle UTF-8 invalid format string specifiers
Improve invalid format string specifier handling by printing out invalid specifiers characters with \x, \u and \U. Previously clang would print g
[Sema] Handle UTF-8 invalid format string specifiers
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"); => warning: invalid conversion specifier ' [-Wformat-invalid-specifier] after: NSLog(@"%\u25B9"); => warning: invalid conversion specifier '\u25b9' [-Wformat-invalid-specifier]
Differential Revision: http://reviews.llvm.org/D18296
rdar://problem/24672159
llvm-svn: 264752
show more ...
|
#
57819fc8 |
| 15-Mar-2016 |
Bob Wilson <bob.wilson@apple.com> |
Move the fixit for -Wformat-security to a note.
r263299 added a fixit for the -Wformat-security warning, but that runs into complications with our guideline that error recovery should be done as-if
Move the fixit for -Wformat-security to a note.
r263299 added a fixit for the -Wformat-security warning, but that runs into complications with our guideline that error recovery should be done as-if the fixit had been applied. Putting the fixit on a note avoids that.
llvm-svn: 263584
show more ...
|
Revision tags: llvmorg-3.8.0 |
|
#
9a31b3b0 |
| 26-Feb-2016 |
Andy Gibbs <andyg1001@hotmail.co.uk> |
Reduce false positives in printf/scanf format checker
Summary: The printf/scanf format checker is a little over-zealous in handling the conditional operator. This patch reduces work by not checking
Reduce false positives in printf/scanf format checker
Summary: The printf/scanf format checker is a little over-zealous in handling the conditional operator. This patch reduces work by not checking code-paths that are never used and reduces false positives regarding uncovered arguments, for example in the code fragment:
printf(minimal ? "%i\n" : "%i: %s\n", code, msg);
Reviewers: rtrieu
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D15636
llvm-svn: 262025
show more ...
|
Revision tags: llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1, llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1, llvmorg-3.6.2, llvmorg-3.6.2-rc1, llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1 |
|
#
1a660256 |
| 07-Sep-2014 |
Hans Wennborg <hans@hanshq.net> |
Try to green test/Sema/format-strings.c on Win bots
llvm-svn: 217327
|
Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1, llvmorg-3.4.2, llvmorg-3.4.2-rc1 |
|
#
272bcf67 |
| 30-Apr-2014 |
Nico Weber <nicolasweber@gmx.de> |
Let stddef.h respect __need_{wchar_t, size_t, NULL, ptrdiff_t, wint_t}.
glibc expects that stddef.h only defines a single thing if either of these defines is set. For example, before this change, a
Let stddef.h respect __need_{wchar_t, size_t, NULL, ptrdiff_t, wint_t}.
glibc expects that stddef.h only defines a single thing if either of these defines is set. For example, before this change, a C file containing
#include <stdlib.h> int ptrdiff_t = 0;
would compile with gcc but not with clang. Now it compiles with clang too.
This also fixes PR12997, where older versions of the Linux headers would define NULL incorrectly, and glibc would define __need_NULL and expect stddef.h to redefine NULL with the correct definition.
llvm-svn: 207606
show more ...
|
Revision tags: llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1 |
|
#
6c6a4f40 |
| 20-Feb-2014 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Emit a warning for non-null terminated format strings and other pathological cases.
PR18905.
llvm-svn: 201795
|
Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3 |
|
#
d4733638 |
| 05-Dec-2013 |
Alp Toker <alp@nuanti.com> |
Correct hyphenations in comments and assert messages
This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities in nearby lines.
llvm-svn: 196466
|
Revision tags: llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1, llvmorg-3.3.1-rc1 |
|
#
0e5d677f |
| 18-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Correctly compute the index of the first string format argument when deciding whether to emit a -Wformat-security warning. <rdar://problem/14178260>.
llvm-svn: 184214
|
Revision tags: llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1 |
|
#
813985b0 |
| 12-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Add a comment to test to clarify the intention here
Comment is taken from the commit message of r151080, by Jean-Daniel Dupas
llvm-svn: 172332
|
Revision tags: llvmorg-3.2.0, llvmorg-3.2.0-rc3, llvmorg-3.2.0-rc2, llvmorg-3.2.0-rc1 |
|
#
2f9cc042 |
| 08-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Format strings: suggest %lld instead of %qd and %Ld with -Wformat-non-iso.
As a corollary to the previous commit, even when an extension is available, we can still offer a fixit to the standard modi
Format strings: suggest %lld instead of %qd and %Ld with -Wformat-non-iso.
As a corollary to the previous commit, even when an extension is available, we can still offer a fixit to the standard modifier.
llvm-svn: 163453
show more ...
|
#
92303592 |
| 08-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Format strings: %Ld isn't available on Darwin or Windows.
This seems to be a GNU libc extension; we offer a fixit to %lld on these platforms.
<rdar://problem/11518237>
llvm-svn: 163452
|
#
abc1e22d |
| 07-Aug-2012 |
Hans Wennborg <hans@hanshq.net> |
Properly check length modfiers for %n in format strings.
llvm-svn: 161408
|
#
16250c7c |
| 31-Jul-2012 |
Hans Wennborg <hans@hanshq.net> |
-Wformat: better handling of qualifiers on pointer arguments
Warn about using pointers to const-qualified types as arguments to scanf. Ignore the volatile qualifier when checking if types match.
ll
-Wformat: better handling of qualifiers on pointer arguments
Warn about using pointers to const-qualified types as arguments to scanf. Ignore the volatile qualifier when checking if types match.
llvm-svn: 161052
show more ...
|
#
5c8de784 |
| 30-Jul-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Do not warn on correct use of the '%n' format specifier.
While '%n' can be used for evil in an attacker-controlled format string, there isn't any acute danger in using it in a literal format string
Do not warn on correct use of the '%n' format specifier.
While '%n' can be used for evil in an attacker-controlled format string, there isn't any acute danger in using it in a literal format string with an argument of the appropriate type.
llvm-svn: 160984
show more ...
|
#
ebcd1c7c |
| 30-Jul-2012 |
Hans Wennborg <hans@hanshq.net> |
Make -Wformat check the argument type for %n.
This makes Clang check that the corresponding argument for "%n" in a format string is a pointer to int.
llvm-svn: 160966
|
#
32d825a4 |
| 17-May-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Use the argument location instead of the format string location when warning about argument type mismatch.
This gives a nicer diagnostic in cases like printf(fmt, i); where previously the
Use the argument location instead of the format string location when warning about argument type mismatch.
This gives a nicer diagnostic in cases like printf(fmt, i); where previously the snippet just pointed at 'fmt' (with a note at the definition of fmt).
It's a wash for cases like printf("%f", i); where previously we snippeted the offending portion of the format string, but didn't indicate which argument was at fault.
llvm-svn: 156968
show more ...
|
Revision tags: llvmorg-3.1.0 |
|
#
d8735089 |
| 11-May-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Merge branch 'format-string-braced-init'
llvm-svn: 156653
|
#
92d49459 |
| 11-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a recent regression with the merging of format attributes.
llvm-svn: 156597
|
Revision tags: llvmorg-3.1.0-rc3 |
|
#
967b9cec |
| 08-May-2012 |
Hans Wennborg <hans@hanshq.net> |
Make -Wformat accept printf("%hhx", c); with -funsigned-char
For "%hhx", printf expects an unsigned char. This makes Clang accept a 'char' argument for that also when using -funsigned-char.
This fi
Make -Wformat accept printf("%hhx", c); with -funsigned-char
For "%hhx", printf expects an unsigned char. This makes Clang accept a 'char' argument for that also when using -funsigned-char.
This fixes PR12761.
llvm-svn: 156388
show more ...
|
#
222f2785 |
| 04-May-2012 |
James Molloy <james.molloy@arm.com> |
Add a predefine __WINT_UNSIGNED__, similar to __WCHAR_UNSIGNED__, and test them both for ARM and X86.
Use this to fully fix Sema/format-strings.c for non-x86 platforms.
Reviewed by Chandler on IRC.
Add a predefine __WINT_UNSIGNED__, similar to __WCHAR_UNSIGNED__, and test them both for ARM and X86.
Use this to fully fix Sema/format-strings.c for non-x86 platforms.
Reviewed by Chandler on IRC.
llvm-svn: 156169
show more ...
|
#
3636554b |
| 04-May-2012 |
James Molloy <james.molloy@arm.com> |
Fix handling of wint_t - we can't assume wint_t is purely an integer promotion of wchar_t - they may differ in signedness.
Teach ASTContext about WIntType, and have it taken from TargetInfo like WCh
Fix handling of wint_t - we can't assume wint_t is purely an integer promotion of wchar_t - they may differ in signedness.
Teach ASTContext about WIntType, and have it taken from TargetInfo like WCharType. Should fix test/Sema/format-strings.c for ARM, with the exception of one subtest which will fail if wint_t and wchar_t are the same size and wint_t is signed, wchar_t is unsigned.
There'll be a followup commit to fix that.
Reviewed by Chandler and Hans at http://llvm.org/reviews/r/8
llvm-svn: 156165
show more ...
|
#
e31772fc |
| 03-May-2012 |
Bob Wilson <bob.wilson@apple.com> |
Add a test for r156092.
llvm-svn: 156132
|
Revision tags: llvmorg-3.1.0-rc2, llvmorg-3.1.0-rc1 |
|
#
c9dd9468 |
| 22-Feb-2012 |
Hans Wennborg <hans@hanshq.net> |
Warn about non-standard format strings (pr12017)
This adds the -Wformat-non-standard flag (off by default, enabled by -pedantic), which warns about non-standard things in format strings (such as the
Warn about non-standard format strings (pr12017)
This adds the -Wformat-non-standard flag (off by default, enabled by -pedantic), which warns about non-standard things in format strings (such as the 'q' length modifier, the 'S' conversion specifier, etc.)
llvm-svn: 151154
show more ...
|
#
58dab682 |
| 21-Feb-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
When calling a non variadic format function(vprintf, vscanf, NSLogv, …), warn if the format string argument is a parameter that is not itself declared as a format string with compatible format.
llvm
When calling a non variadic format function(vprintf, vscanf, NSLogv, …), warn if the format string argument is a parameter that is not itself declared as a format string with compatible format.
llvm-svn: 151080
show more ...
|