Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | clang/test/Sema/format-strings-scanf.c: Relax a couple of expressions with ↵ | NAKAMURA Takumi | 2012-09-08 | 1 | -2/+2 |
| | | | | | | | | | expected-warning-re to let matched for Win32 targets. - format specifies type 'wchar_t **' (aka 'int **') but the argument has type 'float *' - format specifies type 'wchar_t **' (aka 'unsigned short **') but the argument has type 'float *' llvm-svn: 163468 | ||||
* | Format strings: %Ld isn't available on Darwin or Windows. | Jordan Rose | 2012-09-08 | 1 | -11/+1 |
| | | | | | | | | | This seems to be a GNU libc extension; we offer a fixit to %lld on these platforms. <rdar://problem/11518237> llvm-svn: 163452 | ||||
* | Properly check length modfiers for %n in format strings. | Hans Wennborg | 2012-08-07 | 1 | -0/+26 |
| | | | | llvm-svn: 161408 | ||||
* | Remove ScanfArgType and bake that logic into ArgType. | Hans Wennborg | 2012-08-07 | 1 | -0/+6 |
| | | | | | | | | This is useful for example for %n in printf, which expects a pointer to int with the same logic for checking as %d would have in scanf. llvm-svn: 161407 | ||||
* | -Wformat: better handling of qualifiers on pointer arguments | Hans Wennborg | 2012-07-31 | 1 | -0/+18 |
| | | | | | | | Warn about using pointers to const-qualified types as arguments to scanf. Ignore the volatile qualifier when checking if types match. llvm-svn: 161052 | ||||
* | Make -Wformat check the argument type for %n. | Hans Wennborg | 2012-07-30 | 1 | -0/+5 |
| | | | | | | | This makes Clang check that the corresponding argument for "%n" in a format string is a pointer to int. llvm-svn: 160966 | ||||
* | Format string analysis: give 'q' its own enumerator. | Hans Wennborg | 2012-02-16 | 1 | -0/+4 |
| | | | | | | | | | This is in preparation for being able to warn about 'q' and other non-standard format string features. It also allows us to print its name correctly. llvm-svn: 150697 | ||||
* | FormatCheckers should emit all diagnostics using EmitFormatDiagnostic(). | Jean-Daniel Dupas | 2012-01-31 | 1 | -0/+4 |
| | | | | llvm-svn: 149394 | ||||
* | Teach scanf/printf checking about '%Ld' and friends (a GNU extension). ↵ | Ted Kremenek | 2012-01-24 | 1 | -0/+10 |
| | | | | | | Fixes PR 9466. llvm-svn: 148859 | ||||
* | The 'l' length modifier makes sense with the scanlist conversion specifier. | Ted Kremenek | 2012-01-20 | 1 | -1/+4 |
| | | | | llvm-svn: 148586 | ||||
* | Tighten format string diagnostic and make it a bit clearer (and a bit closer ↵ | Ted Kremenek | 2012-01-20 | 1 | -12/+12 |
| | | | | | | to GCC's). llvm-svn: 148579 | ||||
* | Treat -Wformat=0 as an alias for -Wformat. | Hans Wennborg | 2012-01-17 | 1 | -0/+3 |
| | | | | | | Fixes PR9195. llvm-svn: 148300 | ||||
* | scanf: parse the 'm' length modifier, and check that the right arguments | Hans Wennborg | 2012-01-12 | 1 | -2/+18 |
| | | | | | | are used with that and the 'a' length modifier. llvm-svn: 148029 | ||||
* | scanf analysis: the 'a' length modifier is valid with a scanlist | Hans Wennborg | 2012-01-12 | 1 | -1/+2 |
| | | | | | | | Before r148025 we (accidentally) didn't check whether a length modifier is appropriate for a scanlist, but now we do. llvm-svn: 148026 | ||||
* | scanf analysis: don't bail out after successful parse of scanlist | Hans Wennborg | 2012-01-12 | 1 | -0/+4 |
| | | | | llvm-svn: 148025 | ||||
* | Fix test/Sema/format-strings-scanf.c | Hans Wennborg | 2011-12-15 | 1 | -1/+1 |
| | | | | llvm-svn: 146651 | ||||
* | Support the 'a' length modifier in scanf format strings as a C90 | Hans Wennborg | 2011-12-15 | 1 | -0/+9 |
| | | | | | | | | | extension. This fixes gcc.dg/format/c90-scanf-3.c and ext-4.c (test for excess errors). llvm-svn: 146649 | ||||
* | Fix signature of vsscanf in Builtins.def | Hans Wennborg | 2011-12-12 | 1 | -1/+1 |
| | | | | llvm-svn: 146392 | ||||
* | Fix signature of sscanf in Builtins.def | Hans Wennborg | 2011-12-12 | 1 | -1/+1 |
| | | | | llvm-svn: 146390 | ||||
* | Make fscanf, vscanf, etc. be recognized as scanf-like functions. | Hans Wennborg | 2011-12-12 | 1 | -1/+23 |
| | | | | llvm-svn: 146367 | ||||
* | Check that arguments to a scanf call match the format specifier, | Hans Wennborg | 2011-12-10 | 1 | -3/+4 |
| | | | | | | and offer fixits when there is a mismatch. llvm-svn: 146326 | ||||
* | Fix for PR9751 to change the behavior of -Wformat warnings. If the format | Richard Trieu | 2011-10-28 | 1 | -0/+12 |
| | | | | | | | | | | | string is part of the function call, then there is no difference. If the format string is not, the warning will point to the call site and a note will point to where the format string is. Fix-it hints for strings are moved to the note if a note is emitted. This will prevent changes to format strings that may be used in multiple places. llvm-svn: 143168 | ||||
* | Hookup checking for invalid length modifiers in scanf format strings. | Ted Kremenek | 2010-07-20 | 1 | -0/+8 |
| | | | | llvm-svn: 108907 | ||||
* | Don't warn when a '%%' or '%*d' (scanf) is used in a format string with ↵ | Ted Kremenek | 2010-07-19 | 1 | -0/+7 |
| | | | | | | | | positional arguments, since these don't actually consume an argument. llvm-svn: 108757 | ||||
* | Hook up 'invalid conversion' warning for scanf format strings. | Ted Kremenek | 2010-07-19 | 1 | -0/+1 |
| | | | | llvm-svn: 108750 | ||||
* | Add missing conversion specifier parsing for 'u', 'x', 'o', and 's'. Fixes ↵ | Ted Kremenek | 2010-07-19 | 1 | -0/+3 |
| | | | | | | <rdar://problem/8204052>. llvm-svn: 108742 | ||||
* | Remove unicode quotes characters that somehow made it into a recent commit ↵ | Ted Kremenek | 2010-07-16 | 1 | -1/+1 |
| | | | | | | of mine. llvm-svn: 108552 | ||||
* | Hook up warning for an incomplete scanlist in scanf format strings. | Ted Kremenek | 2010-07-16 | 1 | -0/+1 |
| | | | | llvm-svn: 108542 | ||||
* | Tweak zero-field width in scanf format string diagnostic. | Ted Kremenek | 2010-07-16 | 1 | -2/+2 |
| | | | | llvm-svn: 108541 | ||||
* | Add initial test cases for scanf format string checking. | Ted Kremenek | 2010-07-16 | 1 | -0/+14 |
llvm-svn: 108503 |