diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-01-30 01:02:18 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-01-30 01:02:18 +0000 |
commit | c9a89fec60a20eb3269caa95eca048d45ab215ad (patch) | |
tree | b3fa99ad32a9bb91a8aacae1be2ffeb05895b934 /lib/Analysis/PrintfFormatString.cpp | |
parent | f7066acc5061e3587ebbd3108f3b1c554bf692a4 (diff) |
Add format string checking of 'double' arguments. Fixes <rdar://problem/6931734>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/PrintfFormatString.cpp')
-rw-r--r-- | lib/Analysis/PrintfFormatString.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/PrintfFormatString.cpp b/lib/Analysis/PrintfFormatString.cpp index 357080fa74..05b5d9cceb 100644 --- a/lib/Analysis/PrintfFormatString.cpp +++ b/lib/Analysis/PrintfFormatString.cpp @@ -309,6 +309,9 @@ ArgTypeResult FormatSpecifier::getArgType(ASTContext &Ctx) const { // version of ptrdiff_t? return ArgTypeResult(); } + + if (CS.isDoubleArg()) + return Ctx.DoubleTy; // FIXME: Handle other cases. return ArgTypeResult(); |