summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/format-strings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Test] Make Lit tests C++11 compatible - printf format stringCharles Li2017-02-131-3/+17
| | | | | | | | | Different diagnostics when format string does not match actual arg type. This commit contains the first 2 of 3 tests reviewed in D29685 llvm-svn: 294979
* Move the fixit for -Wformat-security to a note.Bob Wilson2016-03-151-0/+1
| | | | | | | | r263299 added a fixit for the -Wformat-security warning, but that runs into complications with our guideline that error recovery should be done as-if the fixit had been applied. Putting the fixit on a note avoids that. llvm-svn: 263584
* Extend format specifier checking to include field function pointers in ↵Aaron Ballman2015-04-231-0/+15
| | | | | | addition to variable function pointers. Addresses PR21082. llvm-svn: 235606
* PR20356: Fix all Sema warnings with mismatched ext_/warn_ versusRichard Smith2014-07-191-1/+1
| | | | | | | | ExtWarn/Warnings. Mostly the name of the warning was changed to match the semantics, but in the PR20356 cases, the warning was about valid code, so the diagnostic was changed from ExtWarn to Warning instead. llvm-svn: 213443
* -Wformat: Don't check format strings in uninstantiated templates.Jordan Rose2012-10-021-1/+59
| | | | | | | | | | | | | Also applies to -Wnonnull, -Wtype-safety, and -Wnon-pod-varargs. All of these can be better checked at instantiation time. This change does not actually affect regular CallExpr function calls, since the checks there only happen after overload resolution. However, it will affect Objective-C method calls. <rdar://problem/12373934> llvm-svn: 164984
* -Wformat-non-iso: warn about positional arguments (pr12017)Hans Wennborg2012-03-091-1/+1
| | | | | | | | | This renames the -Wformat-non-standard flag to -Wformat-non-iso, rewords the current warnings a bit (pointing out that a format string is not supported by ISO C rather than being "non standard"), and adds a warning about positional arguments. llvm-svn: 152403
* Warn about non-standard format strings (pr12017)Hans Wennborg2012-02-221-2/+1
| | | | | | | | | This adds the -Wformat-non-standard flag (off by default, enabled by -pedantic), which warns about non-standard things in format strings (such as the 'q' length modifier, the 'S' conversion specifier, etc.) llvm-svn: 151154
* When calling a non variadic format function(vprintf, vscanf, NSLogv, …), ↵Jean-Daniel Dupas2012-02-211-3/+27
| | | | | | warn if the format string argument is a parameter that is not itself declared as a format string with compatible format. llvm-svn: 151080
* Support all null pointer literals in format strings.David Blaikie2012-02-101-0/+2
| | | | llvm-svn: 150276
* Enhance checking for null format string literal to take into account __null. ↵Ted Kremenek2012-02-101-0/+11
| | | | | | Fixes <rdar://problem/8269537>. llvm-svn: 150260
* Implements support of format_arg attribute on C++ member.Jean-Daniel Dupas2012-02-071-1/+23
| | | | llvm-svn: 149998
* Format string warnings: don't a.k.a. wchar_t with wchar_t.Hans Wennborg2012-01-311-0/+4
| | | | | | | | | | | This fixes the case where Clang would output: error: format specifies type 'wchar_t *' (aka 'wchar_t *') ArgTypeResult::getRepresentativeTypeName needs to take into account that wchar_t can be a built-in type (as opposed to in C, where it is a typedef). llvm-svn: 149387
* Support the 'a' scanf length modifier as an extension in C++.Hans Wennborg2011-12-281-0/+15
It should not be supported in C++11, since that uses the C99 standard library, in which 'a' is a format specifier. llvm-svn: 147310
OpenPOWER on IntegriCloud