summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/PrintfFormatString.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move ParseFormatString() and FormatStringHandler back into the ↵Ted Kremenek2010-02-041-2/+4
| | | | | | analyze_printf namespace. llvm-svn: 95324
* Add format string type checking support for 'long double'.Ted Kremenek2010-02-011-1/+4
| | | | llvm-svn: 95026
* Recognize 'q' as a format length modifier (from BSD).Daniel Dunbar2010-01-301-0/+1
| | | | llvm-svn: 94894
* Add format string checking of 'double' arguments. Fixes ↵Ted Kremenek2010-01-301-0/+3
| | | | | | <rdar://problem/6931734>. llvm-svn: 94867
* Fix spacing.Ted Kremenek2010-01-291-1/+1
| | | | llvm-svn: 94852
* Per a suggestion from Cristian Draghici, add a method to FormatSpecifier ↵Ted Kremenek2010-01-291-0/+53
| | | | | | that returns the expected type of the matching data argument. It isn't complete, but should handle several of the important cases. llvm-svn: 94851
* Enhancements to the alternate (WIP) format string checking:Ted Kremenek2010-01-291-2/+10
| | | | | | | | | | - Add ConversionSpecifier::consumesDataArgument() as a helper method to determine if a conversion specifier requires a matching argument. - Add support for glibc-specific '%m' conversion - Add an extra callback to HandleNull() for locations within the format specifier that have a null character llvm-svn: 94834
* Alternate format string checking: issue warnings for incomplete format ↵Ted Kremenek2010-01-291-13/+11
| | | | | | | | | | specifiers. In addition, move ParseFormatString() and FormatStringHandler() from the clang::analyze_printf to the clang namespace. Hopefully this will resolve some link errors on Linux. llvm-svn: 94794
* Alternate format string checking: issue a warning for invalid conversion ↵Ted Kremenek2010-01-291-13/+18
| | | | | | specifiers. llvm-svn: 94792
* Yet another attempt to make the Linux buildbots happy. Apparently there are ↵Ted Kremenek2010-01-291-4/+7
| | | | | | differences on how nested namespaces are handled... llvm-svn: 94790
* Move definition of FormatStringHandler::~FormatStringHandler() within ↵Ted Kremenek2010-01-291-1/+1
| | | | | | namespace directives. Hopefully this will make the Linux buildbots happy. llvm-svn: 94784
* Add precision/field width checking to AlternateCheckPrintfString().Ted Kremenek2010-01-291-4/+6
| | | | llvm-svn: 94774
* Fix off-by-one error in ParseFormatSpecifier() when reporting the location ↵Ted Kremenek2010-01-281-3/+2
| | | | | | of a null character. llvm-svn: 94762
* Add position of conversion specifier character to 'ConversionSpecifier'.Ted Kremenek2010-01-281-26/+31
| | | | llvm-svn: 94739
* Rename namespace clang::printf to clang::analyze_printf to avoid problems ↵Ted Kremenek2010-01-281-4/+4
| | | | | | where the reference to 'printf' is ambiguous. llvm-svn: 94733
* Allow HandleFormatSpecifier() to indicate that no more processing of the ↵Ted Kremenek2010-01-281-1/+2
| | | | | | format string is desired. llvm-svn: 94715
* Add '@' conversion specifier.Ted Kremenek2010-01-281-4/+5
| | | | llvm-svn: 94713
* Remove invalid conversion specifiers from format string checking.Ted Kremenek2010-01-281-5/+0
| | | | llvm-svn: 94707
* Add a few more conversion specifiers to ParseFormatSpecifier (these appear ↵Ted Kremenek2010-01-281-20/+27
| | | | | | in SemaChecking). llvm-svn: 94704
* Add skeleton for a more structured way to analyzing pring formatTed Kremenek2010-01-271-0/+239
strings than what we currently have in Sema. This is both an experiment and a WIP. The idea is simple: parse the format string incrementally, constructing a well-structure representation of each format specifier. Each format specifier is then handed back one-by-one to a client via a callback. Malformed format strings are also handled with callbacks. The idea is to separate the parsing of the format string from the emission of diagnostics. Currently what we have in Sema for handling format strings is a mongrel of both that is hard to follow and difficult to modify (I can apply this label since I'm the original author of that code). This is in libAnalysis as it is reasonable generic and can potentially be used both by libSema and libChecker. Comments welcome. llvm-svn: 94702
OpenPOWER on IntegriCloud