Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Make -Wformat fix-its preserve original conversion specifiers. | Hans Wennborg | 2012-02-15 | 1 | -8/+10 |
| | | | | | | | | | | | | | | | | | This commit makes PrintfSpecifier::fixType() and ScanfSpecifier::fixType() only fix a conversion specification enough that Clang wouldn't warn about it, as opposed to always changing it to use the "canonical" conversion specifier. (PR11975) This preserves the user's choice of conversion specifier in cases like: printf("%a", (long double)1); where we previously suggested "%Lf", we now suggest "%La" printf("%x", (long)1); where we previously suggested "%ld", we now suggest "%lx". llvm-svn: 150578 | ||||
* | Teach scanf/printf checking about '%Ld' and friends (a GNU extension). ↵ | Ted Kremenek | 2012-01-24 | 1 | -2/+6 |
| | | | | | | Fixes PR 9466. llvm-svn: 148859 | ||||
* | More dead code removal (using -Wunreachable-code) | David Blaikie | 2012-01-20 | 1 | -2/+2 |
| | | | | llvm-svn: 148577 | ||||
* | scanf: parse the 'm' length modifier, and check that the right arguments | Hans Wennborg | 2012-01-12 | 1 | -3/+14 |
| | | | | | | are used with that and the 'a' length modifier. llvm-svn: 148029 | ||||
* | scanf analysis: don't bail out after successful parse of scanlist | Hans Wennborg | 2012-01-12 | 1 | -1/+1 |
| | | | | llvm-svn: 148025 | ||||
* | Support the 'a' length modifier in scanf format strings as a C90 | Hans Wennborg | 2011-12-15 | 1 | -5/+12 |
| | | | | | | | | | extension. This fixes gcc.dg/format/c90-scanf-3.c and ext-4.c (test for excess errors). llvm-svn: 146649 | ||||
* | Check that arguments to a scanf call match the format specifier, | Hans Wennborg | 2011-12-10 | 1 | -1/+252 |
| | | | | | | and offer fixits when there is a mismatch. llvm-svn: 146326 | ||||
* | Revert r109428 "Hoist argument type checking into CheckFormatHandler. This ↵ | Michael J. Spencer | 2010-07-27 | 1 | -6/+0 |
| | | | | | | | | is prep for scanf format" Got errors about ASTContext being undefined with Visual Studio 2010. llvm-svn: 109491 | ||||
* | Fix namespace polution. | Dan Gohman | 2010-07-26 | 1 | -0/+1 |
| | | | | llvm-svn: 109440 | ||||
* | Hoist argument type checking into CheckFormatHandler. This is prep for ↵ | Ted Kremenek | 2010-07-26 | 1 | -0/+6 |
| | | | | | | | | scanf format string argument type checking. llvm-svn: 109428 | ||||
* | Hookup checking for invalid length modifiers in scanf format strings. | Ted Kremenek | 2010-07-20 | 1 | -21/+23 |
| | | | | llvm-svn: 108907 | ||||
* | Add 'ConversionSpecifier' root class in 'analyze_format_string' namespace and | Ted Kremenek | 2010-07-20 | 1 | -27/+27 |
| | | | | | | | derived 'PrintfConversionSpecifier' from this class. We will do the same for 'ScanfConversionSpecifier'. llvm-svn: 108903 | ||||
* | Rename 'ConsumedSoFarArg' -> 'nArg' and 'OutIntPtrArg' to 'nArg' (scanf and ↵ | Ted Kremenek | 2010-07-20 | 1 | -1/+1 |
| | | | | | | printf checking). llvm-svn: 108900 | ||||
* | Add missing conversion specifier parsing for 'u', 'x', 'o', and 's'. Fixes ↵ | Ted Kremenek | 2010-07-19 | 1 | -0/+4 |
| | | | | | | <rdar://problem/8204052>. llvm-svn: 108742 | ||||
* | Hook up warning for an incomplete scanlist in scanf format strings. | Ted Kremenek | 2010-07-16 | 1 | -2/+2 |
| | | | | llvm-svn: 108542 | ||||
* | Add the main scanf-parsing logic that I meant to include in my previous commit. | Ted Kremenek | 2010-07-16 | 1 | -0/+214 |
llvm-svn: 108502 |