From e5f554ac481492d15712cf9e0b2ea48daa43d768 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 28 Dec 2011 13:10:50 +0000 Subject: 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. llvm-svn: 147310 --- clang/lib/Analysis/FormatString.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Analysis/FormatString.cpp') diff --git a/clang/lib/Analysis/FormatString.cpp b/clang/lib/Analysis/FormatString.cpp index bbc6f07b36d..8e295aa2be1 100644 --- a/clang/lib/Analysis/FormatString.cpp +++ b/clang/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. -- cgit v1.2.3