diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-09-08 04:00:03 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-09-08 04:00:03 +0000 |
commit | 92303592c32434e6f8d8f321d1e78fcfec7ac7a4 (patch) | |
tree | 58a39424ab94d8f625746509da24bb929ac1b420 /clang/lib/Analysis/ScanfFormatString.cpp | |
parent | 4d1458ed389922e934581f1a53f02c77a80eb32e (diff) | |
download | bcm5719-llvm-92303592c32434e6f8d8f321d1e78fcfec7ac7a4.tar.gz bcm5719-llvm-92303592c32434e6f8d8f321d1e78fcfec7ac7a4.zip |
Format strings: %Ld isn't available on Darwin or Windows.
This seems to be a GNU libc extension; we offer a fixit to %lld on
these platforms.
<rdar://problem/11518237>
llvm-svn: 163452
Diffstat (limited to 'clang/lib/Analysis/ScanfFormatString.cpp')
-rw-r--r-- | clang/lib/Analysis/ScanfFormatString.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Analysis/ScanfFormatString.cpp b/clang/lib/Analysis/ScanfFormatString.cpp index 2942400621d..082c06af589 100644 --- a/clang/lib/Analysis/ScanfFormatString.cpp +++ b/clang/lib/Analysis/ScanfFormatString.cpp @@ -430,9 +430,11 @@ bool ScanfSpecifier::fixType(QualType QT, const LangOptions &LangOpt, namedTypeToLengthModifier(PT, LM); // If fixing the length modifier was enough, we are done. - const analyze_scanf::ArgType &AT = getArgType(Ctx); - if (hasValidLengthModifier() && AT.isValid() && AT.matchesType(Ctx, QT)) - return true; + if (hasValidLengthModifier(Ctx.getTargetInfo())) { + const analyze_scanf::ArgType &AT = getArgType(Ctx); + if (AT.isValid() && AT.matchesType(Ctx, QT)) + return true; + } // Figure out the conversion specifier. if (PT->isRealFloatingType()) |