summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/format-strings-fixit.c
Commit message (Collapse)AuthorAgeFilesLines
* Bug 7377: printf checking fails to flag some undefined behavior Tom Care2010-06-211-5/+3
| | | | | | | | | | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=7377 Updated format string highlighting and fixits to take advantage of the new CharSourceRange class. - Change HighlightRange to allow highlighting whitespace only in a CharSourceRange (for warnings about the ' ' (space) flag) - Change format specifier range helper function to allow for half-open ranges (+1 to end) - Enabled previously failing tests (FIXMEs/XFAILs removed) - Small fixes and additions to format string test cases M test/Sema/format-strings.c M test/Sema/format-strings-fixit.c M lib/Frontend/TextDiagnosticPrinter.cpp M lib/Sema/SemaChecking.cpp llvm-svn: 106480
* Printf format strings: Added some more tests and fixed some minor bugs.Tom Care2010-06-181-0/+15
| | | | | | | | | | | | | | - Precision toStrings shouldn't print a dot when they have no value. - Length of char length modifier is now returned correctly. - Added several fixit tests. Note: fixit tests are currently broken due to a bug in HighlightRange. Marking as XFAIL for now. M test/Sema/format-strings-fixit.c M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp llvm-svn: 106275
* Fix format string checking of '%c' by treating it as an integer conversion. ↵Ted Kremenek2010-06-171-0/+2
| | | | | | Fixes PR 7391. llvm-svn: 106196
* Extend format string type-checking to include '%p'. Fixes remaining cases ↵Ted Kremenek2010-06-161-0/+1
| | | | | | PR 4468. llvm-svn: 106151
* Small fixes regarding printf fix suggestions.Tom Care2010-06-111-3/+11
| | | | | | | | | | | | - Added some handling of flags that become invalid when changing the conversion specifier. - Changed fixit behavior to remove unnecessary length modifiers. - Separated some tests out and added some comments. modified: lib/Analysis/PrintfFormatString.cpp test/Sema/format-strings-fixit.c llvm-svn: 105807
* Added FixIt support to printf format string checking.Tom Care2010-06-091-0/+20
- Refactored LengthModifier to be a class. - Added toString methods in all member classes of FormatSpecifier. - FixIt suggestions keep user specified flags unless incorrect. Limitations: - The suggestions are not conversion specifier sensitive. For example, if we have a 'pad with zeroes' flag, and the correction is a string conversion specifier, we do not remove the flag. Clang will warn us on the next compilation. A test/Sema/format-strings-fixit.c M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp M lib/Sema/SemaChecking.cpp llvm-svn: 105680
OpenPOWER on IntegriCloud