Hans Wennborg
507b567707
Treat -Wformat=0 as an alias for -Wformat.
...
Fixes PR9195.
llvm-svn: 148300
2012-01-17 09:30:38 +00:00
Hans Wennborg
6073e31baa
scanf: parse the 'm' length modifier, and check that the right arguments
...
are used with that and the 'a' length modifier.
llvm-svn: 148029
2012-01-12 17:11:12 +00:00
Hans Wennborg
fd950878fa
scanf analysis: the 'a' length modifier is valid with a scanlist
...
Before r148025 we (accidentally) didn't check whether a length modifier is
appropriate for a scanlist, but now we do.
llvm-svn: 148026
2012-01-12 15:07:16 +00:00
Hans Wennborg
32f115f9c1
scanf analysis: don't bail out after successful parse of scanlist
...
llvm-svn: 148025
2012-01-12 14:44:54 +00:00
Hans Wennborg
29b653413a
Fix test/Sema/format-strings-scanf.c
...
llvm-svn: 146651
2011-12-15 11:43:45 +00:00
Hans Wennborg
23926bd2d7
Support the 'a' length modifier in scanf format strings as a C90
...
extension.
This fixes gcc.dg/format/c90-scanf-3.c and ext-4.c (test for excess
errors).
llvm-svn: 146649
2011-12-15 10:25:47 +00:00
Hans Wennborg
4951c67875
Fix signature of vsscanf in Builtins.def
...
llvm-svn: 146392
2011-12-12 18:46:05 +00:00
Hans Wennborg
8d5a4093f5
Fix signature of sscanf in Builtins.def
...
llvm-svn: 146390
2011-12-12 18:33:02 +00:00
Hans Wennborg
bb4189db23
Make fscanf, vscanf, etc. be recognized as scanf-like functions.
...
llvm-svn: 146367
2011-12-12 10:34:18 +00:00
Hans Wennborg
b1a5e09f6f
Check that arguments to a scanf call match the format specifier,
...
and offer fixits when there is a mismatch.
llvm-svn: 146326
2011-12-10 13:20:11 +00:00
Richard Trieu
03cf7b70e0
Fix for PR9751 to change the behavior of -Wformat warnings. If the format
...
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
2011-10-28 00:41:25 +00:00
Ted Kremenek
4407ea4948
Hookup checking for invalid length modifiers in scanf format strings.
...
llvm-svn: 108907
2010-07-20 20:04:47 +00:00
Ted Kremenek
6cd694233d
Don't warn when a '%%' or '%*d' (scanf) is used in a format string with positional arguments, since
...
these don't actually consume an argument.
llvm-svn: 108757
2010-07-19 22:01:06 +00:00
Ted Kremenek
ce81542d61
Hook up 'invalid conversion' warning for scanf format strings.
...
llvm-svn: 108750
2010-07-19 21:25:57 +00:00
Ted Kremenek
5c3e1b9a54
Add missing conversion specifier parsing for 'u', 'x', 'o', and 's'. Fixes <rdar://problem/8204052>.
...
llvm-svn: 108742
2010-07-19 19:47:40 +00:00
Ted Kremenek
0030be81f5
Remove unicode quotes characters that somehow made it into a recent commit of mine.
...
llvm-svn: 108552
2010-07-16 20:49:01 +00:00
Ted Kremenek
d7b31cc60d
Hook up warning for an incomplete scanlist in scanf format strings.
...
llvm-svn: 108542
2010-07-16 18:28:03 +00:00
Ted Kremenek
c618728e8d
Tweak zero-field width in scanf format string diagnostic.
...
llvm-svn: 108541
2010-07-16 18:27:56 +00:00
Ted Kremenek
5530131bb7
Add initial test cases for scanf format string checking.
...
llvm-svn: 108503
2010-07-16 02:11:34 +00:00