diff options
author | Hans Wennborg <hans@hanshq.net> | 2011-12-28 13:10:50 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2011-12-28 13:10:50 +0000 |
commit | 5294c792c715b8dba26711be482b7a32be04d4d5 (patch) | |
tree | fe1abdf57d2363b5f578ef24bd3bc9dc4050c4cd /lib/Analysis/FormatString.cpp | |
parent | 72b20ff76a9070c1a481331e857aa825ae37c97f (diff) |
Support the 'a' scanf length modifier as an extension in C++.
It should not be supported in C++11, since that uses the C99 standard
library, in which 'a' is a format specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147310 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/FormatString.cpp')
-rw-r--r-- | lib/Analysis/FormatString.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/FormatString.cpp b/lib/Analysis/FormatString.cpp index bbc6f07b36..8e295aa2be 100644 --- a/lib/Analysis/FormatString.cpp +++ b/lib/Analysis/FormatString.cpp @@ -200,7 +200,7 @@ clang::analyze_format_string::ParseLengthModifier(FormatSpecifier &FS, case 'L': lmKind = LengthModifier::AsLongDouble; ++I; break; case 'q': lmKind = LengthModifier::AsLongLong; ++I; break; case 'a': - if (IsScanf && !LO.C99 && !LO.CPlusPlus) { + if (IsScanf && !LO.C99 && !LO.CPlusPlus0x) { // For scanf in C90, look at the next character to see if this should // be parsed as the GNU extension 'a' length modifier. If not, this // will be parsed as a conversion specifier. |